Package globus.glmap
Class GLMapDocumentTreeStorage
java.lang.Object
globus.glmap.GLMapDocumentTreeStorage
- All Implemented Interfaces:
GLMapCustomStorage
Storage implementation for document tree
-
Constructor Summary
ConstructorsConstructorDescriptionGLMapDocumentTreeStorage(android.content.ContentResolver resolver, androidx.documentfile.provider.DocumentFile file) Default constructor -
Method Summary
Modifier and TypeMethodDescriptioncreateFile(String name) Create filecreateStorage(String name) Creates new storage inside this storage (folder)booleandeleteFile(Object object) Deletes fileSearches file with given nameGets name of fileObject[]List files in storageintopenForReading(Object object) Opens file for readingintopenForWriting(Object object) Opens file for writingbooleanSets name of file
-
Constructor Details
-
GLMapDocumentTreeStorage
public GLMapDocumentTreeStorage(@NonNull android.content.ContentResolver resolver, @NonNull androidx.documentfile.provider.DocumentFile file) Default constructor- Parameters:
resolver- content resolverfile- root of storage
-
-
Method Details
-
listFiles
Description copied from interface:GLMapCustomStorageList files in storage- Specified by:
listFilesin interfaceGLMapCustomStorage- Returns:
- files in storage
-
getName
Description copied from interface:GLMapCustomStorageGets name of file- Specified by:
getNamein interfaceGLMapCustomStorage- Parameters:
object- file object returned by listFiles- Returns:
- name of file
-
setName
Description copied from interface:GLMapCustomStorageSets name of file- Specified by:
setNamein interfaceGLMapCustomStorage- Parameters:
object- file objectnewName- new name to set- Returns:
- true if success
-
openForWriting
Description copied from interface:GLMapCustomStorageOpens file for writing- Specified by:
openForWritingin interfaceGLMapCustomStorage- Parameters:
object- file object- Returns:
- file descriptor for writing
-
openForReading
Description copied from interface:GLMapCustomStorageOpens file for reading- Specified by:
openForReadingin interfaceGLMapCustomStorage- Parameters:
object- file object- Returns:
- file descriptor for reading
-
deleteFile
Description copied from interface:GLMapCustomStorageDeletes file- Specified by:
deleteFilein interfaceGLMapCustomStorage- Parameters:
object- file object- Returns:
- true if success
-
createFile
Description copied from interface:GLMapCustomStorageCreate file- Specified by:
createFilein interfaceGLMapCustomStorage- Parameters:
name- name of file- Returns:
- file object or null if failed
-
findFile
Description copied from interface:GLMapCustomStorageSearches file with given name- Specified by:
findFilein interfaceGLMapCustomStorage- Parameters:
name- name of file- Returns:
- file object or null if failed
-
createStorage
Description copied from interface:GLMapCustomStorageCreates new storage inside this storage (folder)- Specified by:
createStoragein interfaceGLMapCustomStorage- Parameters:
name- name of storage- Returns:
- new storage
-