FileStorage class

Class for using storage functions in local storage.

The root folder is getLibraryDirectory for IOS and getApplicationDocumentsDirectory for others.

ローカルストレージでストレージ機能を利用するためのクラス。

ルートフォルダはIOSの場合、getLibraryDirectoryがそれ以外はgetApplicationDocumentsDirectoryが用いられます。

Inheritance

Constructors

FileStorage()
Class for using storage functions in local storage.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

delete(String fileFullPath) Future<void>
Passing fileFullPath, the full path of the storage, will delete files at that location.
override
exists(String fileFullPath) Future<bool>
By passing fileFullPath, which is the full path of the storage, it checks if the file exists at that location.
override
fetchURI(String fileRelativePath) Future<String>
Passing fileRelativePath, a path relative to the storage root, returns the full path to the file at that location.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read(String fileFullPath) Future<Uint8List>
By passing fileFullPath, the full path of the storage, data can be retrieved from that path.
override
toString() String
A string representation of this object.
inherited
write(String fileFullPath, Uint8List bytes) Future<void>
By passing the full path of the storage fileFullPath and the actual data bytes, the file can be saved in that path.
override

Operators

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

Static Properties

documentDirectory Future<String?>
Obtains the document path where the file can be placed by determining the platform.
no setter