file property

Future<File> get file

The current file being written to.

Created on first access, which also emits a FileDataManagerEventTypes.fileCreated event.

Implementation

Future<File> get file async {
  if (_file == null) {
    final newFilename = await filename;
    _file = File(newFilename);
    info("Creating file '$newFilename'");
    addEvent(FileDataManagerEvent(FileDataManagerEventTypes.fileCreated, newFilename));
  }
  return _file!;
}