A portable virtual filesystem boundary.
Paths are opaque strings: path normalisation and sandbox policy belong to
implementations, not to this contract. Every host operation returns a
Result and must not throw to communicate an expected failure.
- Implementers
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createDirectory(
String path, {bool recursive = false}) → Future< Result< void> > -
Creates the directory at
path. -
delete(
String path, {bool recursive = false}) → Future< Result< void> > -
Deletes the file or directory at
path. -
exists(
String path) → Future< Result< bool> > -
Reports whether
pathresolves to anything. -
list(
String path, {bool recursive = false}) → Future< Result< List< >VfsEntry> > -
Lists the entries directly (or, when
recursive, transitively) underpath. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readBytes(
String path) → Future< Result< List< >int> > -
Reads
pathas bytes. -
readText(
String path) → Future< Result< String> > -
Reads
pathas UTF-8 text. -
stat(
String path) → Future< Result< VfsStat> > -
Describes
pathwithout listing its parent. -
toString(
) → String -
A string representation of this object.
inherited
-
writeBytes(
String path, List< int> bytes, {bool createParents = false}) → Future<Result< void> > -
Writes
bytestopath, optionally creating missing parents. -
writeText(
String path, String content, {bool createParents = false}) → Future< Result< void> > -
Writes
contenttopathas UTF-8, optionally creating missing parents.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited