file_based_transaction_manager 0.0.1 copy "file_based_transaction_manager: ^0.0.1" to clipboard
file_based_transaction_manager: ^0.0.1 copied to clipboard

outdated

Save a Copy from your files easily and rollback them any time.

example/file_based_transaction_manager_example.dart

import 'dart:io';

import 'package:file_based_transaction_manager/src/session.dart';
import 'package:file_based_transaction_manager/transaction_manager.dart';

void main() async {
  TransactionManager x2 = TransactionManager(folderName: "temp");
  var session = x2.beginSession();
  var session2 = x2.beginSession();

  var file = File(
      '${Directory.current.path}/example/file_based_transaction_manager_example.dart');
  var file2 = File('${Directory.current.path}/example/example_file.txt');

  session.addFile(file);
  session2.addFile(file2);

  file2.deleteSync();
  await Future.delayed(Duration(seconds: 15));

  x2.rollback(session);
  x2.close(session);
}
2
likes
0
points
21
downloads

Publisher

unverified uploader

Weekly Downloads

Save a Copy from your files easily and rollback them any time.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on file_based_transaction_manager