Directory class

A reference to a directory on the file system.

Implemented types
Implementers

Constructors

Directory()

Properties

absolute Directory
Returns a Directory instance whose path is the absolute path to this. [...]
read-only, override
basename String
Gets the part of this entity's path after the last separator. [...]
read-only, inherited
dirname String
Gets the part of this entity's path before the last separator. [...]
read-only, inherited
fileSystem FileSystem
Returns the file system responsible for this entity.
read-only, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
isAbsolute bool
Returns a bool indicating whether this object's path is absolute. [...]
read-only, inherited
parent Directory
The directory containing this.
read-only, inherited
path String
Gets the path of this directory.
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
uri Uri
Returns a Uri representing the directory's location. [...]
read-only, inherited

Methods

childDirectory(String basename) Directory
Returns a reference to a Directory that exists as a child of this directory and has the specified basename.
childFile(String basename) File
Returns a reference to a File that exists as a child of this directory and has the specified basename.
Returns a reference to a Link that exists as a child of this directory and has the specified basename.
create({bool recursive: false }) Future<Directory>
Creates the directory with this name. [...]
override
createTemp([String prefix ]) Future<Directory>
Creates a temporary directory in this directory. Additional random characters are appended to prefix to produce a unique directory name. If prefix is missing or null, the empty string is used for prefix. [...]
override
createTempSync([String prefix ]) Directory
Synchronously creates a temporary directory in this directory. Additional random characters are appended to prefix to produce a unique directory name. If prefix is missing or null, the empty string is used for prefix. [...]
override
list({bool recursive: false, bool followLinks: true }) Stream<FileSystemEntity>
Lists the sub-directories and files of this Directory. Optionally recurses into sub-directories. [...]
override
listSync({bool recursive: false, bool followLinks: true }) List<FileSystemEntity>
Lists the sub-directories and files of this Directory. Optionally recurses into sub-directories. [...]
override
rename(String newPath) Future<Directory>
Renames this directory. Returns a Future<Directory> that completes with a Directory instance for the renamed directory. [...]
override
renameSync(String newPath) Directory
Synchronously renames this directory. Returns a Directory instance for the renamed directory. [...]
override
createSync({bool recursive: false }) → void
Synchronously creates the directory with this name. [...]
inherited
delete({bool recursive: false }) Future<FileSystemEntity>
Deletes this FileSystemEntity. [...]
inherited
deleteSync({bool recursive: false }) → void
Synchronously deletes this FileSystemEntity. [...]
inherited
exists() Future<bool>
Checks whether the file system entity with this path exists. Returns a Future<bool> that completes with the result. [...]
inherited
existsSync() bool
Synchronously checks whether the file system entity with this path exists. [...]
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
Resolves the path of a file system object relative to the current working directory. [...]
inherited
resolveSymbolicLinksSync() String
Resolves the path of a file system object relative to the current working directory. [...]
inherited
stat() Future<FileStat>
Calls the operating system's stat() function on the path of this FileSystemEntity. [...]
inherited
statSync() FileStat
Synchronously calls the operating system's stat() function on the path of this FileSystemEntity. [...]
inherited
toString() String
Returns a string representation of this object.
inherited
watch({int events: FileSystemEvent.all, bool recursive: false }) Stream<FileSystemEvent>
Start watching the FileSystemEntity for changes. [...]
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited