Directory class abstract
A reference to a directory on the file system.
- Inheritance
-
- Object
- FileSystemEntity
- Directory
- Implemented types
- Implementers
- Available extensions
Properties
- absolute → Directory
-
Returns a Directory instance whose path is the absolute path to
this.no setter - fs → FileSystem
-
The file system for this entity.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAbsolute → bool
-
Returns a
boolindicating whether this object's path is absolute.no setterinherited - parent → Directory
-
The directory containing
this.no setterinherited - path → String
-
The path of the entity.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
childPath(
String path) → String -
Child path
inherited
-
create(
{bool recursive = false}) → Future< Directory> - Creates the directory with this name.
-
delete(
{bool recursive = false}) → Future< FileSystemEntity> -
Deletes this FileSystemEntity.
inherited
-
directory(
String path) → Directory -
Child directory
inherited
-
directoryWith(
{String? path}) → Directory -
Directory from an optional path, null meaning itself for Directory,
currentDirectory for FileSystem
inherited
-
emptyOrCreate(
) → Future< void> -
Available on Directory, provided by the DirectoryEmptyOrCreateExt extension
Ensure the directory is created and empty. -
exists(
) → Future< bool> -
Checks whether the file system entity with this path exists.
inherited
-
file(
String path) → File -
Child file
inherited
-
link(
String path) → Link -
Child link
inherited
-
list(
{bool recursive = false, bool followLinks = true}) → Stream< FileSystemEntity> - Lists the sub-directories and files of this Directory.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
rename(
String newPath) → Future< FileSystemEntity> -
Renames this file system entity.
inherited
-
stat(
) → Future< FileStat> -
Calls the operating system's
stat()function on the path of this FileSystemEntity.inherited -
toString(
) → String -
A string representation of this object.
inherited
-
tryCreate(
) → Future< bool> -
Available on Directory, provided by the FsShimDirectoryExtension extension
Tries to create a directory at path. Never throws.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited