StorageManager class

Constructors

StorageManager({String defaultDisk = 'local', Map<String, StorageDisk>? initialDisks, Map<String, StorageDriverFactory>? customDrivers})

Properties

defaultDisk String
Gets the current default disk name
no setter
diskCount int
Gets the number of registered disks
no setter
diskNames List<String>
Gets all registered disk names
no setter
driverCount int
Gets the number of registered drivers
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copy(String from, String to) Future<void>
delete(String path) Future<void>
deleteDirectory(String path) Future<void>
disk([String? name]) StorageDisk
Returns a disk instance by name or uses the default.
exists(String path) Future<bool>
flush() → void
Clears all registered disks
fromConfig(Map<String, dynamic> config) → void
Loads disks dynamically from a config map.
get(String path) Future<List<int>>
getStream(String path) Stream<List<int>>
hasDisk(String name) bool
Checks if a disk is registered
lastModified(String path) Future<DateTime>
listFiles(String directoryPath) Future<List<String>>
makeDirectory(String path) Future<void>
mimeType(String path) Future<String?>
move(String from, String to) Future<void>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
put(String path, List<int> bytes) Future<void>
putStream(String path, Stream<List<int>> stream) Future<void>
readString(String path) Future<String>
registerDisk(String name, StorageDisk disk) → void
Registers a disk manually at runtime.
registerDriver(String name, StorageDriverFactory factory) → void
Registers a custom storage driver.
removeDisk(String name) → void
Removes a disk from the registry
setDefaultDisk(String name) → void
Sets the default disk
size(String path) Future<int>
temporaryUrl(String path, DateTime expiration) Future<String>
toString() String
A string representation of this object.
inherited
url(String path) String
writeString(String path, String content) Future<void>

Operators

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