InMemoryFsspecFilesystem class

In-memory FilesystemProtocol implementation for memory:// URLs and unit testing of object-store and POSIX-like fsspec backends.

Inheritance

Constructors

InMemoryFsspecFilesystem({Object? protocol = 'memory', String rootMarker = '', bool asyncImpl = false, bool asynchronous = false, bool autoMkdir = true, String? backendVersion})
Creates an in-memory fsspec filesystem.

Properties

asynchronous → bool
Whether this filesystem instance was created with asynchronous=True.
final
asyncImpl → bool
Whether this backend implements an async-capable fsspec filesystem.
final
autoMkdir → bool
Whether write operations automatically create parent directories.
final
backendVersion → String?
Optional backend library version string (for example the adlfs version on Azure filesystems).
final
hashCode → int
The hash code for this object.
no setterinherited
invalidated → List<String?>
Paths passed to invalidateCache, recorded in call order for diagnostics and unit tests.
final
objects → Map<String, (List<int>, Map<String, Object?>)>
Read-only view of stored keys mapped to (bytes, info) records.
no setter
protocol → Object?
Protocol name (e.g. 'memory', 'file', 's3', 'gs') or list of protocol names supported by this filesystem.
final
rootMarker → String
Root prefix marker ('' for object/memory stores, '/' for POSIX stores).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

catFile(String path) → List<int>
Reads and returns the raw bytes of the file at path.
override
exists(String path) → FutureOr<bool>
Returns whether path exists in this filesystem.
inherited
find(String path, {int? maxdepth, bool withdirs = false, bool detail = false, String? prefix}) → Object
Recursively lists entries under path.
override
info(String path) → Map<String, Object?>
Returns metadata dictionary for path.
override
invalidateCache([String? path]) → void
Invalidates cached directory listings and metadata for path (or the entire filesystem when path is omitted).
override
makedirs(String path, {bool existOk = false}) → FutureOr<void>
Creates path and its parent directories if needed.
inherited
metadata(String path) → Map<String, String>
Returns user metadata for path (used by S3 / s3fs backends whose info() and listings omit user metadata).
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openWrite(String path, {String mode = 'wb', int? generation, bool finalizeOnClose = false, Map<String, String>? metadata, Map<String, Object?>? contentSettings}) → FsspecWriteStream
Opens path for writing with mode (e.g. 'xb' or 'wb').
override
parent(String path) → String
Returns the parent directory path of path, matching fsspec._parent.
inherited
pipeFile(String path, List<int> data, {String mode = 'overwrite', String? contentType, Map<String, String>? metadata}) → void
Writes data to path.
override
putFile(String path, List<int> bytes, {Map<String, Object?>? info}) → void
Writes bytes and optional info metadata at path.
removeFile(String path) → void
Removes a file at path, if present.
rm(String path, {bool recursive = false}) → FutureOr<void>
Removes path, optionally recursively when recursive is true.
inherited
rmFile(String path) → void
Removes the single file at path.
override
setxattrs(String path, {String? contentType, Map<String, String>? metadata}) → void
Updates extended attributes (contentType and custom metadata) on an existing object at path.
override
splitPath(String path) → (String, String, Object?)?
Optional gcsfs helper splitting path into (bucket, key, generation).
inherited
stripProtocol(String path) → String
Strips any URL scheme/protocol prefix from path and returns the filesystem-internal path.
override
syncLookupBucketType(String bucket) → String?
Optional gcsfs helper returning the bucket type for bucket (e.g. 'ZONAL_HIERARCHICAL' on Rapid GCS buckets).
inherited
toString() → String
A string representation of this object.
inherited
unstripProtocol(String path) → String
Prepends the canonical protocol scheme of this filesystem to path.
override
updateInfo(String path, Map<String, Object?> fields) → void
Updates stored info fields on path in place for test setup.

Operators

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