FileSystemProvider constructor

FileSystemProvider({
  1. Event<List<FileChangeEvent>>? onDidChangeFile,
  2. Disposable watch(
    1. Uri,
    2. dynamic
    )?,
  3. Object stat(
    1. Uri
    )?,
  4. FutureOr<List<(String, FileType)>> readDirectory(
    1. Uri
    )?,
  5. FutureOr<void> createDirectory(
    1. Uri
    )?,
  6. FutureOr<Uint8List> readFile(
    1. Uri
    )?,
  7. FutureOr<void> writeFile(
    1. Uri,
    2. Uint8List,
    3. dynamic
    )?,
  8. FutureOr<void> delete(
    1. Uri,
    2. dynamic
    )?,
  9. FutureOr<void> rename(
    1. Uri,
    2. Uri,
    3. dynamic
    )?,
  10. FutureOr<void> copy(
    1. Uri,
    2. Uri,
    3. dynamic
    )?,
})

Implementation

factory FileSystemProvider({
  _i3.Event<_i2.List<_i3.FileChangeEvent>>? onDidChangeFile,
  _i3.Disposable Function(
    _i3.Uri,
    _i2.dynamic,
  )? watch,
  _i2.Object Function(_i3.Uri)? stat,
  _i4.FutureOr<
              _i2.List<
                  (
                    _i2.String,
                    _i3.FileType,
                  )>>
          Function(_i3.Uri)?
      readDirectory,
  _i4.FutureOr<void> Function(_i3.Uri)? createDirectory,
  _i4.FutureOr<_i8.Uint8List> Function(_i3.Uri)? readFile,
  _i4.FutureOr<void> Function(
    _i3.Uri,
    _i8.Uint8List,
    _i2.dynamic,
  )? writeFile,
  _i4.FutureOr<void> Function(
    _i3.Uri,
    _i2.dynamic,
  )? delete,
  _i4.FutureOr<void> Function(
    _i3.Uri,
    _i3.Uri,
    _i2.dynamic,
  )? rename,
  _i4.FutureOr<void> Function(
    _i3.Uri,
    _i3.Uri,
    _i2.dynamic,
  )? copy,
}) =>
    FileSystemProvider._(
      onDidChangeFile: onDidChangeFile ?? _i6.undefined,
      watch: watch == null ? null : _i5.allowInterop(watch),
      stat: stat == null ? null : _i5.allowInterop(stat),
      readDirectory: readDirectory == null
          ? null
          : _i5.allowInterop(
              (p0) => _i6.Promise.futureOr(() => readDirectory(p0))),
      createDirectory: createDirectory == null
          ? null
          : _i5.allowInterop(
              (p0) => _i6.Promise.futureOr(() => createDirectory(p0))),
      readFile: readFile == null
          ? null
          : _i5
              .allowInterop((p0) => _i6.Promise.futureOr(() => readFile(p0))),
      writeFile: writeFile == null
          ? null
          : _i5.allowInterop((
              p0,
              p1,
              p2,
            ) =>
              _i6.Promise.futureOr(() => writeFile(
                    p0,
                    p1,
                    p2,
                  ))),
      delete: delete == null
          ? null
          : _i5.allowInterop((
              p0,
              p1,
            ) =>
              _i6.Promise.futureOr(() => delete(
                    p0,
                    p1,
                  ))),
      rename: rename == null
          ? null
          : _i5.allowInterop((
              p0,
              p1,
              p2,
            ) =>
              _i6.Promise.futureOr(() => rename(
                    p0,
                    p1,
                    p2,
                  ))),
      copy: copy == null
          ? null
          : _i5.allowInterop((
              p0,
              p1,
              p2,
            ) =>
              _i6.Promise.futureOr(() => copy(
                    p0,
                    p1,
                    p2,
                  ))),
    );