-
public final class FileFullPathIf you're using the following functions:
then you can construct FileFullPath:
// for API 30+ val fullPath = FileFullPath(context, StorageType.EXTERNAL, "DCIM") // for API 29-, define storage ID explicitly val fullPath = FileFullPath(context, StorageId.PRIMARY, "DCIM") storageHelper.requestStorageAccess(initialPath = fullPath) storageHelper.openFolderPicker(initialPath = fullPath)
-
-
Field Summary
Fields Modifier and Type Field Description private final StringstorageIdprivate final StringbasePathprivate StringabsolutePathprivate StringsimplePathprivate final Uriuriprivate final StorageTypestorageType
-
Constructor Summary
Constructors Constructor Description FileFullPath(Context context, String fullPath)FileFullPath(Context context, String storageId, String basePath)FileFullPath(Context context, StorageType storageType, String basePath)FileFullPath(Context context, File file)
-
Method Summary
Modifier and Type Method Description final StringgetStorageId()final StringgetBasePath()final StringgetAbsolutePath()final UnitsetAbsolutePath(String absolutePath)final StringgetSimplePath()final UnitsetSimplePath(String simplePath)final UrigetUri()final StorageTypegetStorageType()final UritoDocumentUri(Context context)final UnitcheckIfStorageIdIsAccessibleInSafSelector()-
-
Constructor Detail
-
FileFullPath
FileFullPath(Context context, String fullPath)
- Parameters:
fullPath- can be simple path or absolute path
-
FileFullPath
FileFullPath(Context context, StorageType storageType, String basePath)
-
-
Method Detail
-
getStorageId
final String getStorageId()
-
getBasePath
final String getBasePath()
-
getAbsolutePath
final String getAbsolutePath()
-
setAbsolutePath
final Unit setAbsolutePath(String absolutePath)
-
getSimplePath
final String getSimplePath()
-
setSimplePath
final Unit setSimplePath(String simplePath)
-
getStorageType
final StorageType getStorageType()
-
toDocumentUri
final Uri toDocumentUri(Context context)
-
checkIfStorageIdIsAccessibleInSafSelector
@RestrictTo(value = {RestrictTo.Scope.LIBRARY}) final Unit checkIfStorageIdIsAccessibleInSafSelector()
-
-
-
-