celer 1.0.0 copy "celer: ^1.0.0" to clipboard
celer: ^1.0.0 copied to clipboard

Specialized fast async file writer. Celer makes writing to the same file often/concurrently fast and safe.

example/celer_example.dart

import 'dart:io';
import 'package:celer/celer.dart';
import 'package:path/path.dart' as p;

Future<void> main() async {
  /// setup codes
  final dir = await Directory.systemTemp.createTemp('celer-test-');
  final celerFile = File(p.join(dir.path, 'celer.txt'));
  final data = String.fromCharCodes(List.filled(1024, 'x'.codeUnitAt(0)));
  final dataset = List.generate(1000, (index) => data);

  /// usage
  final celer = CelerWriter(celerFile.path);
  await Future.wait(dataset.map((e) => celer.write(e)));
}
0
likes
150
pub points
0%
popularity

Publisher

unverified uploader

Specialized fast async file writer. Celer makes writing to the same file often/concurrently fast and safe.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

path

More

Packages that depend on celer