public class GKFile
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
GKFile.Type
The type of the entry on the GateKeeper Card.
|
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
mCardPath
The absolute path to the entry on the GateKeeper Card.
|
protected java.lang.String |
mName
The name of the file.
|
protected GKFile.Type |
mType
The
Type of the file. |
static java.lang.String |
TAG |
| Constructor and Description |
|---|
GKFile(java.lang.String name,
GKFile.Type type)
Create a
GKFile with the given name and type. |
GKFile(java.lang.String name,
GKFile.Type type,
int fileSize)
Create a
GKFile with the given name and type. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getCardPath()
Retrieve the absolute path to the file on the GateKeeper Card.
|
java.lang.String |
getExtension()
Retrieve the file system extension (when present) of the file.
|
java.lang.String |
getFilenameBase()
Retrieve the filename without the extension (when present) of the file.
|
int |
getFileSize()
Retrieve the size of the file as returned from the card.
|
java.lang.String |
getName()
Retrieve the name of the file.
|
java.lang.String |
getParentCardPath()
Retrieve the parent directory
|
GKFile.Type |
getType()
Retrieve the type of the file.
|
boolean |
isDirectory()
Retrieve whether the file refers to a directory or a file entry on the GateKeeper Card.
|
void |
setCardPath(java.lang.String fullPath)
Assign the absolute path to the file on the GateKeeper Card.
|
void |
setCardPath(java.lang.String parentPath,
java.lang.String fileName)
Assign the absolute path to the file on the GateKeeper Card.
|
void |
setName(java.lang.String name)
Assign the name of the file.
|
void |
setType(GKFile.Type type)
Assign the type of the file.
|
public static final java.lang.String TAG
protected java.lang.String mCardPath
protected java.lang.String mName
protected GKFile.Type mType
Type of the file.public GKFile(java.lang.String name,
GKFile.Type type)
GKFile with the given name and type.name - the String name of the filetype - the Type of the filepublic GKFile(java.lang.String name,
GKFile.Type type,
int fileSize)
GKFile with the given name and type.name - the String name of the filetype - the Type of the filefileSize - the int size of the file in bytespublic java.lang.String getName()
public void setName(java.lang.String name)
name - the String name of the filepublic GKFile.Type getType()
public void setType(GKFile.Type type)
type - the Type of the filepublic boolean isDirectory()
true if the file refers to a directory on the GateKeeper Card or
false if the file refers to a file entry.public java.lang.String getExtension()
String extension of the file.
NULL if the file is a directory or does not have an extension.public java.lang.String getFilenameBase()
String name of the file without extension.
NULL if the file is a directory or does not have an extension.public java.lang.String getCardPath()
String path to the filepublic void setCardPath(java.lang.String fullPath)
fullPath - the absolute String path to the filepublic void setCardPath(java.lang.String parentPath,
java.lang.String fileName)
parentPath - the absolute String path to the parent of the filefileName - the String name of the filepublic java.lang.String getParentCardPath()
public int getFileSize()
int value of the file size