On this page
File constructor
- String path
Creates a File 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 File(String path) {
final IOOverrides? overrides = IOOverrides.current;
if (overrides == null) {
return new _File(path);
}
return overrides.createFile(path);
}
© 2012 the Dart project authors
Licensed under the BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.18.5/dart-io/File/File.html