FileSync constructor

FileSync(
  1. String path, {
  2. FileMode fileMode = FileMode.writeOnlyAppend,
})

Opens a file for synchronous IO.

If you instantiate FileSync you MUST call close.

We rececommend that you use withOpenFile in preference to directly calling this method.

Implementation

FileSync(String path, {FileMode fileMode = FileMode.writeOnlyAppend}) {
  _file = File(path);
  _open(fileMode);
}