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.Uri
The URI representing the file in the document tree. -
Method Summary
Modifier and TypeMethodDescriptionboolean
delete()
Deletes this file.boolean
Returns this file as a storagelong
Returns the last modified timestamp of the file.long
Returns 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.boolean
Returns true if this object is a directoryint
Opens the file for reading.int
openForWriting
(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.boolean
setLastModified
(long lastModified) Sets the last modified timestamp of the file.boolean
Sets 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:GLMapStorageFile
Returns the storage that contains this file.- Specified by:
getStorage
in classGLMapStorageFile
- Returns:
- the storage containing this file
-
isDirectory
public boolean isDirectory()Description copied from class:GLMapStorageFile
Returns true if this object is a directory- Specified by:
isDirectory
in classGLMapStorageFile
- Returns:
- true if this object is a directory
-
getAsStorage
Description copied from class:GLMapStorageFile
Returns this file as a storage- Specified by:
getAsStorage
in classGLMapStorageFile
- Returns:
- storage if this object is a directory, otherwise null
-
getName
Description copied from class:GLMapStorageFile
Gets the name of this file.- Specified by:
getName
in classGLMapStorageFile
- Returns:
- the name of the file, or null if it has no name
-
setName
Description copied from class:GLMapStorageFile
Sets the name of this file.- Specified by:
setName
in classGLMapStorageFile
- Parameters:
newName
- the new name to set- Returns:
- true if the name was successfully set, false otherwise
-
getVFSName
Description copied from class:GLMapStorageFile
Gets the VFS (Virtual File System) name of this file.- Specified by:
getVFSName
in classGLMapStorageFile
- Returns:
- the VFS name of the file, or null if it has no VFS name
-
openInputStream
Description copied from class:GLMapStorageFile
Opens an input stream to read from this file.- Specified by:
openInputStream
in classGLMapStorageFile
- Returns:
- an input stream to read from the file
- Throws:
FileNotFoundException
- if the file cannot be found
-
openOutputStream
Description copied from class:GLMapStorageFile
Opens an output stream to write to this file.- Specified by:
openOutputStream
in 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:GLMapStorageFile
Opens the file for writing.- Specified by:
openForWriting
in 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:GLMapStorageFile
Opens the file for reading.- Specified by:
openForReading
in classGLMapStorageFile
- Returns:
- a file descriptor for reading from the file
-
delete
public boolean delete()Description copied from class:GLMapStorageFile
Deletes this file.- Specified by:
delete
in classGLMapStorageFile
- Returns:
- true if the file was successfully deleted, false otherwise
-
getLength
public long getLength()Description copied from class:GLMapStorageFile
Returns the size of the file in bytes.- Specified by:
getLength
in classGLMapStorageFile
- Returns:
- the size of the file in bytes
-
getLastModified
public long getLastModified()Description copied from class:GLMapStorageFile
Returns the last modified timestamp of the file.- Specified by:
getLastModified
in classGLMapStorageFile
- Returns:
- the last modified timestamp of the file
-
setLastModified
public boolean setLastModified(long lastModified) Description copied from class:GLMapStorageFile
Sets the last modified timestamp of the file.- Specified by:
setLastModified
in classGLMapStorageFile
- Parameters:
lastModified
- the new last modified timestamp- Returns:
- true if the timestamp was successfully set, false otherwise
-