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(File file,
int mode)
Changes the Unix permissions of a provided file.
|
void |
createSymbolicLink(File link,
File target)
Creates a symbolic link to a target file.
|
int |
getUnixMode(File file)
Returns the Unix permissions for a provided file.
|
boolean |
isCaseSensitive()
Tells whether the file system is case sensitive.
|
boolean |
tryCreateSymbolicLink(File link,
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(File link, File target) throws IOException
link - the link to be createdtarget - the file to link toIOException - if the operation failsboolean tryCreateSymbolicLink(File link, File target)
link - the link to be createdtarget - the file to link toint getUnixMode(File file) throws IOException
file - the file to read permissions fromFileNotFoundException - if file doesn't existIOException - if the permissions can't be readDEFAULT_DIR_MODE,
DEFAULT_FILE_MODEvoid chmod(File file, int mode) throws IOException
file - the file to change permissions onmode - the permissions, e.g. 0755FileNotFoundException - if file doesn't existIOException - if the permissions can't be changedCopyright © 2013. All rights reserved