MemoryFileSystem.test constructor Null safety

  1. {FileSystemStyle style = FileSystemStyle.posix,
  2. void opHandle(
    1. String context,
    2. FileSystemOp operation
    ) = _defaultOpHandle}

Creates a new MemoryFileSystem that has a fake clock.

The file system will be empty, and the current directory will be the root directory.

The clock will increase monotonically each time it is used, disconnected from any real-world clock.

If style is specified, the file system will use the specified path style. The default is FileSystemStyle.posix.


factory MemoryFileSystem.test({
  FileSystemStyle style = FileSystemStyle.posix,
  void Function(String context, FileSystemOp operation) opHandle =
}) =>
      style: style,
      clock: Clock.monotonicTest(),
      opHandle: opHandle,