Vfs class abstract interface

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 path resolves to anything.
list(String path, {bool recursive = false}) Future<Result<List<VfsEntry>>>
Lists the entries directly (or, when recursive, transitively) under path.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readBytes(String path) Future<Result<List<int>>>
Reads path as bytes.
readText(String path) Future<Result<String>>
Reads path as UTF-8 text.
stat(String path) Future<Result<VfsStat>>
Describes path without 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 bytes to path, optionally creating missing parents.
writeText(String path, String content, {bool createParents = false}) Future<Result<void>>
Writes content to path as UTF-8, optionally creating missing parents.

Operators

operator ==(Object other) bool
The equality operator.
inherited