DVDeviceStorage class
DV.Platform.fileStorage.
Properties
- adapter → DVFileStorageAdapter
-
no setterinherited
- cache → DVDeviceStorage
-
The app's cache: the same calls, in the directory the OS may clear
when space runs low.
no setter
- directory → String?
-
The directory keys resolve in, or null in a browser, which has none.
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
-
configure(
DVFileStorageAdapter adapter) → void -
Swaps the storage behind
DV.FileStorage. Defaults to DVMemoryFileStorageAdapter; pass an S3FileStorageAdapter for an object store.inherited -
delete(
String key) → Future< void> -
inherited
-
exists(
String key) → Future< bool> -
inherited
-
get(
String key) → Future< List< int> > -
inherited
-
list(
{String prefix = ''}) → Future< List< String> > -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pick(
{String type = 'any', bool multiple = false}) → Future< List< DVPickedFile> > - Opens the platform's file picker. Empty when the person cancels.
-
pickDirectory(
{String? title}) → Future< DVStorage?> - Opens the platform's folder picker and answers the folder as a storage with the same calls, or null when the person cancels.
-
put(
String key, List< int> bytes, {String? contentType}) → Future<void> -
inherited
-
requestAccess(
DVDeviceFileAccess access) → Future< void> -
Asks for
access, which must be declared underdartvel.fileStorage. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- config → DVFileStorageConfig
-
The declaration in force.
no setter
- instance → DVDeviceStorage
-
no setter
Static Methods
-
declare(
{String? appId, DVFileStorageConfig config = const DVFileStorageConfig()}) → void -
What the generated runtime says at startup: the app's id (its directory
name on desktops) and its
dartvel.fileStoragedeclaration. -
reset(
) → void - Back to the real device directories.
-
useAdapters(
DVFileStorageAdapter files, {DVFileStorageAdapter? cache}) → void -
Replaces the device adapters, for tests.
cachedefaults tofiles.