InMemoryFsspecFilesystem class
In-memory FilesystemProtocol implementation for memory:// URLs and
unit testing of object-store and POSIX-like fsspec backends.
- Inheritance
-
- Object
- FilesystemProtocol
- InMemoryFsspecFilesystem
Constructors
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
adlfsversion 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
pathexists 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 whenpathis omitted).override -
makedirs(
String path, {bool existOk = false}) → FutureOr< void> -
Creates
pathand its parent directories if needed.inherited -
metadata(
String path) → Map< String, String> -
Returns user metadata for
path(used by S3 /s3fsbackends whoseinfo()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
pathfor writing withmode(e.g.'xb'or'wb').override -
parent(
String path) → String -
Returns the parent directory path of
path, matchingfsspec._parent.inherited -
pipeFile(
String path, List< int> data, {String mode = 'overwrite', String? contentType, Map<String, String> ? metadata}) → void -
Writes
datatopath.override -
putFile(
String path, List< int> bytes, {Map<String, Object?> ? info}) → void -
Writes
bytesand optionalinfometadata atpath. -
removeFile(
String path) → void -
Removes a file at
path, if present. -
rm(
String path, {bool recursive = false}) → FutureOr< void> -
Removes
path, optionally recursively whenrecursiveistrue.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 (
contentTypeand custommetadata) on an existing object atpath.override -
splitPath(
String path) → (String, String, Object?)? -
Optional gcsfs helper splitting
pathinto(bucket, key, generation).inherited -
stripProtocol(
String path) → String -
Strips any URL scheme/protocol prefix from
pathand 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
pathin place for test setup.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited