Package globus.glmap
Class GLMapDocumentTreeStorage.FileInfo
java.lang.Object
globus.glmap.GLMapStorageFile
globus.glmap.GLMapDocumentTreeStorage.FileInfo
- Enclosing class:
- GLMapDocumentTreeStorage
The FileInfo class represents a file in the GLMapDocumentTreeStorage.
-
Field Summary
FieldsModifier and TypeFieldDescriptionandroid.net.UriThe URI representing the file in the document tree. -
Method Summary
Modifier and TypeMethodDescriptionbooleandelete()Deletes this file.booleanReturns this file as a storagelongReturns the last modified timestamp of the file.longReturns the size of the file in bytes.getName()Gets the name of this file.Returns the storage that contains this file.Gets the VFS (Virtual File System) name of this file.booleanReturns true if this object is a directoryintOpens the file for reading.intopenForWriting(boolean truncate) Opens the file for writing.Opens an input stream to read from this file.Opens an output stream to write to this file.booleansetLastModified(long lastModified) Sets the last modified timestamp of the file.booleanSets the name of this file.Methods inherited from class globus.glmap.GLMapStorageFile
findSibling, getPath, truncate
-
Field Details
-
uri
public android.net.Uri uriThe URI representing the file in the document tree.
-
-
Method Details
-
equals
-
getStorage
Description copied from class:GLMapStorageFileReturns the storage that contains this file.- Specified by:
getStoragein classGLMapStorageFile- Returns:
- the storage containing this file
-
isDirectory
public boolean isDirectory()Description copied from class:GLMapStorageFileReturns true if this object is a directory- Specified by:
isDirectoryin classGLMapStorageFile- Returns:
- true if this object is a directory
-
getAsStorage
Description copied from class:GLMapStorageFileReturns this file as a storage- Specified by:
getAsStoragein classGLMapStorageFile- Returns:
- storage if this object is a directory, otherwise null
-
getName
Description copied from class:GLMapStorageFileGets the name of this file.- Specified by:
getNamein classGLMapStorageFile- Returns:
- the name of the file, or null if it has no name
-
setName
Description copied from class:GLMapStorageFileSets the name of this file.- Specified by:
setNamein classGLMapStorageFile- Parameters:
newName- the new name to set- Returns:
- true if the name was successfully set, false otherwise
-
getVFSName
Description copied from class:GLMapStorageFileGets the VFS (Virtual File System) name of this file.- Specified by:
getVFSNamein classGLMapStorageFile- Returns:
- the VFS name of the file, or null if it has no VFS name
-
openInputStream
Description copied from class:GLMapStorageFileOpens an input stream to read from this file.- Specified by:
openInputStreamin classGLMapStorageFile- Returns:
- an input stream to read from the file
- Throws:
FileNotFoundException- if the file cannot be found
-
openOutputStream
Description copied from class:GLMapStorageFileOpens an output stream to write to this file.- Specified by:
openOutputStreamin classGLMapStorageFile- Returns:
- an output stream to write to the file
- Throws:
FileNotFoundException- if the file cannot be found
-
openForWriting
public int openForWriting(boolean truncate) Description copied from class:GLMapStorageFileOpens the file for writing.- Specified by:
openForWritingin classGLMapStorageFile- Parameters:
truncate- if true, truncates the file to zero length before writing- Returns:
- a file descriptor for writing to the file
-
openForReading
public int openForReading()Description copied from class:GLMapStorageFileOpens the file for reading.- Specified by:
openForReadingin classGLMapStorageFile- Returns:
- a file descriptor for reading from the file
-
delete
public boolean delete()Description copied from class:GLMapStorageFileDeletes this file.- Specified by:
deletein classGLMapStorageFile- Returns:
- true if the file was successfully deleted, false otherwise
-
getLength
public long getLength()Description copied from class:GLMapStorageFileReturns the size of the file in bytes.- Specified by:
getLengthin classGLMapStorageFile- Returns:
- the size of the file in bytes
-
getLastModified
public long getLastModified()Description copied from class:GLMapStorageFileReturns the last modified timestamp of the file.- Specified by:
getLastModifiedin classGLMapStorageFile- Returns:
- the last modified timestamp of the file
-
setLastModified
public boolean setLastModified(long lastModified) Description copied from class:GLMapStorageFileSets the last modified timestamp of the file.- Specified by:
setLastModifiedin classGLMapStorageFile- Parameters:
lastModified- the new last modified timestamp- Returns:
- true if the timestamp was successfully set, false otherwise
-