FileSystemBackend class
Web stub for the native-only filesystem backend — constructor throws.
Mirrors the io variant's CROSS-PLATFORM public surface (statics
included) so code compiled for both targets analyzes against one
shape — the analyzer resolves conditional exports through this
default branch. The one deliberate gap: the native constructor's
os: seam parameter (its types are dart:io-typed and cannot compile
here); white-box tests of the native impl import it directly.
- Implemented types
- Mixed-in types
Constructors
- FileSystemBackend(String baseDir, {bool osBackup = true})
-
Throws UnsupportedError: the filesystem requires
dart:io.
Properties
- disposeLabel → String
-
Short class name used in the post-dispose error, e.g.
'FileSystemBackend'.no setteroverride - hashCode → int
-
The hash code for this object.
no setterinherited
- isDisposed → bool
-
True once markDisposed has run.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
checkNotDisposed(
) → void -
Throws StateError when this object has been disposed. Call as the
first statement of every public method.
inherited
-
copy(
String sourceKey, String destKey) → Future< void> -
Copy an object, including its metadata.
override
-
delete(
String key) → Future< void> -
Delete a single object.
override
-
deletePrefix(
String prefix) → Future< void> -
Delete every object whose key starts with
prefix(batch delete).override -
dispose(
) → Future< void> -
Release the resources this backend itself constructed (database
connections, HTTP clients). Idempotent — safe to call twice. Every
method except dispose throws StateError afterwards.
override
-
exists(
String key) → Future< bool> -
Check if a key exists. Convenience for
(await head(key)) != null.override -
head(
String key) → Future< ObjectInfo?> -
Get object metadata without reading the body (HeadObject).
override
-
list(
String prefix) → Future< List< ObjectInfo> > -
List every object whose key starts with
prefix, with full metadata.override -
markDisposed(
) → void -
Record disposal. Idempotent.
inherited
-
materialize(
String key, {bool decrypt = true, bool exclusive = false}) → Future< MaterializedFile> -
Make a stored object available as a platform-local accessible resource.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
read(
String key) → Future< Uint8List> -
Read entire contents as bytes. Convenience wrapper over readStream.
override
-
readRange(
String key, {required int start, required int length}) → Future< Uint8List> -
Read a byte range.
override
-
readStream(
String key) → Stream< List< int> > -
Read as a byte stream. Primary read path.
override
-
sweepTombstones(
) → Future< void> - Throws UnsupportedError — see the io variant.
-
toString(
) → String -
A string representation of this object.
inherited
-
updateMetadata(
String key, {String? contentType, Map< String, String> metadata = const {}}) → Future<void> -
Update metadata for an existing object without touching its bytes.
override
-
write(
String key, Uint8List bytes, [WriteOptions options = const WriteOptions()]) → Future< void> -
Write bytes. Convenience wrapper over writeStream.
override
-
writeStream(
String key, Stream< List< byteStream, [WriteOptions options = const WriteOptions()]) → Future<int> >void> -
Write a byte stream with optional write options.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- tombstoneSuffix → const String
- Mirrors the io variant's constant — see it for semantics.
- writeTempSuffix → const String
- Mirrors the io variant's constant — see it for semantics.