public interface FileSystem
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_DIR_MODE
Default Unix permissions for directories,
755. |
static int |
DEFAULT_FILE_MODE
Default Unix permissions for files,
644. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canCreateSymbolicLink()
Tells if the file system can create symbolic links.
|
void |
chmod(java.io.File file,
int mode)
Changes the Unix permissions of a provided file.
|
void |
createSymbolicLink(java.io.File link,
java.io.File target)
Creates a symbolic link to a target file.
|
int |
getUnixMode(java.io.File file)
Returns the Unix permissions for a provided file.
|
boolean |
isCaseSensitive()
Tells whether the file system is case sensitive.
|
boolean |
tryCreateSymbolicLink(java.io.File link,
java.io.File target)
Tries to create a symbolic link to a target file.
|
static final int DEFAULT_DIR_MODE
755.static final int DEFAULT_FILE_MODE
644.boolean isCaseSensitive()
boolean canCreateSymbolicLink()
void createSymbolicLink(java.io.File link,
java.io.File target)
throws java.io.IOException
link - the link to be createdtarget - the file to link tojava.io.IOException - if the operation failsboolean tryCreateSymbolicLink(java.io.File link,
java.io.File target)
link - the link to be createdtarget - the file to link toint getUnixMode(java.io.File file)
throws java.io.IOException
file - the file to read permissions fromjava.io.FileNotFoundException - if file doesn't existjava.io.IOException - if the permissions can't be readDEFAULT_DIR_MODE,
DEFAULT_FILE_MODEvoid chmod(java.io.File file,
int mode)
throws java.io.IOException
file - the file to change permissions onmode - the permissions, e.g. 0755java.io.FileNotFoundException - if file doesn't existjava.io.IOException - if the permissions can't be changedCopyright © 2013. All rights reserved