AgentFileStore class abstract
Provides an abstract base class for file storage operations.
All paths are relative to an implementation-defined root. Implementations
may map these paths to a local file system, in-memory store, remote blob
storage, or other mechanisms. Paths use forward slashes as separators and
must not escape the root (e.g., via .. segments). It is up to each
implementation to enforce this.
- Implementers
Constructors
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
-
createDirectoryAsync(
String path, [CancellationToken? cancellationToken]) → Future< void> - Ensures a directory exists, creating it if necessary.
-
deleteFileAsync(
String path, [CancellationToken? cancellationToken]) → Future< bool> - Deletes a file.
-
fileExistsAsync(
String path, [CancellationToken? cancellationToken]) → Future< bool> - Checks whether a file exists.
-
listChildrenAsync(
String directory, [CancellationToken? cancellationToken]) → Future< List< FileStoreEntry> > - Lists the direct children (files and subdirectories) of a directory.
-
listFilesAsync(
String directory, [CancellationToken? cancellationToken]) → Future< List< String> > - Lists files in a directory.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readFileAsync(
String path, [CancellationToken? cancellationToken]) → Future< String?> - Reads the content of a file.
-
searchFilesAsync(
String directory, String regexPattern, [String? filePattern, bool recursive = false, CancellationToken? cancellationToken]) → Future< List< FileSearchResult> > - Searches for files whose content matches a regular expression pattern.
-
toString(
) → String -
A string representation of this object.
inherited
-
writeFileAsync(
String path, String content, [CancellationToken? cancellationToken]) → Future< void> - Writes content to a file, creating or overwriting it.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited