Directory constructor

Directory(
  1. String path
)

Creates a Directory object.

If path is a relative path, it will be interpreted relative to the current working directory (see Directory.current), when used.

If path is an absolute path, it will be immune to changes to the current working directory.

Implementation

@pragma("vm:entry-point")
factory Directory(String path) {
  final IOOverrides? overrides = IOOverrides.current;
  if (overrides == null) {
    return new _Directory(path);
  }
  return overrides.createDirectory(path);
}