MemoryFileSystem.test constructor
MemoryFileSystem.test({
- FileSystemStyle style = FileSystemStyle.posix,
- void opHandle(
- String context,
- FileSystemOp operation
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.
Implementation
factory MemoryFileSystem.test({
FileSystemStyle style = FileSystemStyle.posix,
void Function(String context, FileSystemOp operation) opHandle =
_defaultOpHandle,
}) =>
_MemoryFileSystem(
style: style,
clock: Clock.monotonicTest(),
opHandle: opHandle,
);