FileHandle constructor

FileHandle(
  1. String _path, {
  2. AbstractFileOpenMode openMode = AbstractFileOpenMode.read,
})

Implementation

FileHandle(
  this._path, {
  AbstractFileOpenMode openMode = AbstractFileOpenMode.read,
})  : _position = 0,
      super(openMode) {
  if (openMode == AbstractFileOpenMode.write) {
    File(_path).createSync(recursive: true);
  }
  _open();
  _length = _file!.lengthSync();
}