Saf class

Extend the native SAF api funtionality and add some of the real Use case methods for Applicatoions

Constructors

Saf(String _directory)

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

cache({String? fileType}) Future<List<String>?>
clearCache() Future<bool?>
Returns bool after deleting files from App's Package files folder for respective Granted Directory To cache an Directory call cache
getCachedFilesPath() Future<List<String>?>
Returns an List<String> with all cached files full path
getDirectoryPermission({bool grantWritePermission = true, bool isDynamic = false}) Future<bool?>
Request the user for access to Directory Permission, if access hasn't already been grant access before.
getFilesPath({String fileType = "any"}) Future<List<String>?>
Equivalent to DocumentsContract.buildDocumentUriUsingTree and here it decode URI's to full Path
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
releasePersistedPermission() Future<void>
Will revoke an persistable URI
singleCache({required String? filePath, String? directory}) Future<String?>
sync() Future<bool?>
Returns 'bool' on syncing the Directory's files with Cached Directory
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

cacheFor(String? directory, {String fileType = "any"}) Future<List<String>?>
Static method for Dynamic call
clearCacheFor(String? directory) Future<bool?>
Static method for Dynamic call Returns bool after deleting files from App's Package files folder for respective Granted Directory To cache an Directory call cache
getCachedFilesPathFor(String? directory) Future<List<String>?>
Static method for Dynamic call Returns an List<String> with all cached files full path
getDynamicDirectoryPermission({bool grantWritePermission = true}) Future<bool?>
Request the user for access to Directory Permission of User choice
getFilesPathFor(String? directory, {String fileType = "any"}) Future<List<String>?>
Static method for Dynamic call Equivalent to DocumentsContract.buildDocumentUriUsingTree and here it decode URI's to full Path
getPersistedPermissionDirectories() Future<List<String>?>
Returns an List<String> with all persisted Directory
isPersistedPermissionDirectoryFor(String? uriString) Future<bool?>
Convenient method to verify if a given Directory is allowed to be write or read from SAF API's
releasePersistedPermissionFor(String? directory) Future<void>
Will revoke an persistable URI
releasePersistedPermissions() Future<void>
Will revoke an persistable URI
syncWith(String? directory) Future<bool?>
Static method for Dynamic call Returns 'bool' on syncing the Directory's files with Cached Directory