FileSystemSink constructor

FileSystemSink(
  1. FileSystem fs,
  2. String path,
  3. int baseEpochUs
)

Creates a new FileSystemSink writing to path on fs.

Implementation

FileSystemSink(this.fs, this.path, this.baseEpochUs) {
  _file = fs.file(path);
  if (!_file.parent.existsSync()) {
    _file.parent.createSync(recursive: true);
  }
  _ios = _file.openWrite(mode: FileMode.write);
  _ios.write('[\n');
}