VirtualFileOperations class

Inheritance

Constructors

VirtualFileOperations(List<String> allowedDirectories)
Constructs a VirtualFileOperations object for managing directories.

Properties

currentDirectory String
getter/setter pairinherited
directoryMappings Map<String, String>
final
hashCode int
The hash code for this object.
no setterinherited
rootDirectory String
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

changeDirectory(String path) → void
Changes the current working directory to the specified path.
override
changeToParentDirectory() → void
Changes the current working directory to the parent directory.
override
createDirectory(String path) Future<void>
Creates a directory at the specified path.
override
deleteDirectory(String path) Future<void>
Deletes the directory at the specified path.
override
deleteFile(String path) Future<void>
Deletes the file at the specified path.
override
exists(String path) bool
Checks if a file or directory exists at the specified path.
override
fileSize(String path) Future<int>
Returns the size of the file at the specified path.
override
getCurrentDirectory() String
Returns the current working directory.
inherited
getFile(String path) Future<File>
Retrieves a File object for the given path.
override
listDirectory(String path) Future<List<FileSystemEntity>>
Lists the contents of the directory at the given path.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readFile(String path) Future<List<int>>
Reads and returns the data from the file at the specified path.
override
resolvePath(String path) String
Resolves the given path relative to the currentDirectory. The resolved path is normalized and checked to ensure it stays within the rootDirectory.
override
toString() String
A string representation of this object.
inherited
writeFile(String path, List<int> data) Future<void>
Writes data to a file at the specified path.
override

Operators

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