com.sun.grid.installer.util
public class ExtendedFile extends java.io.File
FileHandler#getFileProps(),
Serialized Form| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PERM_GROUP_EXECUTE |
static java.lang.String |
PERM_GROUP_READ |
static java.lang.String |
PERM_GROUP_WRITE |
static java.lang.String |
PERM_USER_EXECUTE |
static java.lang.String |
PERM_USER_READ |
static java.lang.String |
PERM_USER_WRITE |
static java.lang.String |
PERM_WORLD_EXECUTE |
static java.lang.String |
PERM_WORLD_READ |
static java.lang.String |
PERM_WORLD_WRITE |
| Constructor and Description |
|---|
ExtendedFile(java.lang.String pathName)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
ExtendedFile |
getFirstExistingParent()
Returns with the first existing parent of this file/directory
|
java.lang.String |
getGroup()
Returns the group id of this file.
|
java.lang.String |
getOwner()
Returns the owner of this file.
|
java.lang.String |
getPermissions()
Returns the permission string of this file.
|
boolean |
hasExecutePermission(java.lang.String user,
java.lang.String group)
Checks whether the given user has permission to execute the given file.
|
boolean |
hasReadPermission(java.lang.String user,
java.lang.String group)
Checks whether the given user has permission to read the given file.
|
boolean |
hasWritePermission(java.lang.String user,
java.lang.String group)
Checks whether the given user has permission to write the given file.
|
void |
setExtendedProps()
Sets the owner, permission, group properties if this file/directory.
|
java.lang.String |
toString() |
canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toURI, toURLpublic static final java.lang.String PERM_USER_READ
public static final java.lang.String PERM_USER_WRITE
public static final java.lang.String PERM_USER_EXECUTE
public static final java.lang.String PERM_GROUP_READ
public static final java.lang.String PERM_GROUP_WRITE
public static final java.lang.String PERM_GROUP_EXECUTE
public static final java.lang.String PERM_WORLD_READ
public static final java.lang.String PERM_WORLD_WRITE
public static final java.lang.String PERM_WORLD_EXECUTE
public ExtendedFile(java.lang.String pathName)
pathName - The file path.public void setExtendedProps()
public java.lang.String getGroup()
public java.lang.String getOwner()
public java.lang.String getPermissions()
public java.lang.String toString()
toString in class java.io.Filepublic ExtendedFile getFirstExistingParent()
public boolean hasReadPermission(java.lang.String user,
java.lang.String group)
user - The user to checkgroup - The group the user belongs topublic boolean hasWritePermission(java.lang.String user,
java.lang.String group)
user - The user to checkgroup - The group the user belongs topublic boolean hasExecutePermission(java.lang.String user,
java.lang.String group)
user - The user to checkgroup - The group the user belongs to