LocalFileSystem class Null safety
A wrapper implementation around dart:io
's implementation.
Since this implementation of the FileSystem interface delegates to
dart:io
, is is not suitable for use in the browser.
- Inheritance
-
- Object
- FileSystem
- LocalFileSystem
Constructors
- LocalFileSystem()
-
Creates a new
LocalFileSystem
.const
Properties
- currentDirectory ↔ Directory
-
Creates a directory object pointing to the current working directory.
read / writeoverride
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- isWatchSupported → bool
-
Tests if FileSystemEntity.watch is supported on the current system.
read-onlyoverride
- path → Context
-
An object for manipulating paths in this file system.
read-onlyoverride
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
- systemTempDirectory → Directory
-
Gets the directory provided by the operating system for creating temporary
files and directories in. The location of the system temp directory is
platform-dependent, and may be set by an environment variable.
read-onlyoverride
Methods
-
directory(
dynamic path) → Directory -
Returns a reference to a Directory at
path
.override -
file(
dynamic path) → File -
Returns a reference to a File at
path
.override -
getPath(
dynamic path) → String -
Gets the string path represented by the specified generic
path
.protected">@protectedinherited -
identical(
String path1, String path2) → Future< bool> -
Checks whether two paths refer to the same object in the
file system. Returns a Future<bool> that completes with the result.
override
-
identicalSync(
String path1, String path2) → bool -
Synchronously checks whether two paths refer to the same object in the
file system.
override
-
isDirectory(
String path) → Future< bool> -
Checks if
type(path)
returnsio.FileSystemEntityType.DIRECTORY
.inherited -
isDirectorySync(
String path) → bool -
Synchronously checks if
type(path)
returnsio.FileSystemEntityType.DIRECTORY
.inherited -
isFile(
String path) → Future< bool> -
Checks if
type(path)
returnsio.FileSystemEntityType.FILE
.inherited -
isFileSync(
String path) → bool -
Synchronously checks if
type(path)
returnsio.FileSystemEntityType.FILE
.inherited -
isLink(
String path) → Future< bool> -
Checks if
type(path)
returnsio.FileSystemEntityType.LINK
.inherited -
isLinkSync(
String path) → bool -
Synchronously checks if
type(path)
returnsio.FileSystemEntityType.LINK
.inherited -
link(
dynamic path) → Link -
Returns a reference to a Link at
path
.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
stat(
String path) → Future< FileStat> -
Asynchronously calls the operating system's stat() function on
path
. Returns a Future which completes with a io.FileStat object containing the data returned by stat(). If the call fails, completes the future with a io.FileStat object with .type set to FileSystemEntityType.NOT_FOUND and the other fields invalid.override -
statSync(
String path) → FileStat -
Calls the operating system's stat() function on
path
. Returns a io.FileStat object containing the data returned by stat(). If the call fails, returns a io.FileStat object with .type set to FileSystemEntityType.NOT_FOUND and the other fields invalid.override -
toString(
) → String -
A string representation of this object.
inherited
-
type(
String path, {bool followLinks = true}) → Future< FileSystemEntityType> -
Finds the type of file system object that a
path
points to. Returns a Futurethat completes with the result. override -
typeSync(
String path, {bool followLinks = true}) → FileSystemEntityType -
Syncronously finds the type of file system object that a
path
points to. Returns a io.FileSystemEntityType.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited