public class FS_POSIX_Java7 extends FS_POSIX
FS.Attributes, FS.FSFactory
Modifier and Type | Method and Description |
---|---|
boolean |
canExecute(File f)
Determine if the file is executable (or not).
|
void |
createSymLink(File path,
String target)
Create a symbolic link
|
void |
delete(File path)
Delete a file.
|
boolean |
exists(File path)
Tests if the path exists, in case of a symbolic link, true even if the
target does not exist
|
FS.Attributes |
getAttributes(File path) |
boolean |
isDirectory(File path)
Check if path is a directory.
|
boolean |
isFile(File path)
Examine if path represents a regular file.
|
boolean |
isHidden(File path) |
boolean |
isSymLink(File path) |
long |
lastModified(File path)
Get the last modified time of a file system object.
|
long |
length(File f)
Get the length of a file or link, If the OS/JRE supports symbolic links
it's the length of the link, else the length of the target.
|
FS |
newInstance() |
File |
normalize(File file)
Normalize the unicode path to composed form.
|
String |
normalize(String name)
Normalize the unicode path to composed form.
|
String |
readSymLink(File path)
Check if a file is a symbolic link and read it
|
boolean |
retryFailedLockFileCommit()
Does this file system have problems with atomic renames?
|
boolean |
setExecute(File f,
boolean canExecute)
Set a file to be executable by the user.
|
void |
setHidden(File path,
boolean hidden)
Set the hidden attribute for file whose name starts with a period.
|
void |
setLastModified(File path,
long time)
Set the last modified time of a file system object.
|
boolean |
supportsExecute()
Does this operating system and JRE support the execute flag on files?
|
boolean |
supportsSymlinks()
Does this operating system and JRE supports symbolic links.
|
discoverGitPrefix, isCaseSensitive, runInShell
detect, detect, gitPrefix, readPipe, resolve, searchPath, setGitPrefix, setUserHome, userHome, userHomeImpl
public FS newInstance()
newInstance
in class FS
public boolean supportsExecute()
FS
supportsExecute
in class FS
public boolean canExecute(File f)
FS
Not all platforms and JREs support executable flags on files. If the feature is unsupported this method will always return false.
If the platform supports symbolic links and f
is a symbolic link
this method returns false, rather than the state of the executable flags
on the target file.
canExecute
in class FS
f
- abstract path to test.public boolean setExecute(File f, boolean canExecute)
FS
Not all platforms and JREs support executable flags on files. If the feature is unsupported this method will always return false and no changes will be made to the file specified.
setExecute
in class FS
f
- path to modify the executable status of.canExecute
- true to enable execution; false to disable it.public boolean retryFailedLockFileCommit()
FS
retryFailedLockFileCommit
in class FS
public boolean supportsSymlinks()
FS
supportsSymlinks
in class FS
public boolean isSymLink(File path) throws IOException
isSymLink
in class FS
IOException
public long lastModified(File path) throws IOException
FS
lastModified
in class FS
IOException
public void setLastModified(File path, long time) throws IOException
FS
setLastModified
in class FS
IOException
public void delete(File path) throws IOException
FS
delete
in class FS
IOException
- this may be a Java7 subclass with detailed informationpublic long length(File f) throws IOException
FS
length
in class FS
IOException
public boolean exists(File path)
FS
public boolean isDirectory(File path)
FS
isDirectory
in class FS
public boolean isFile(File path)
FS
public boolean isHidden(File path) throws IOException
isHidden
in class FS
IOException
public void setHidden(File path, boolean hidden) throws IOException
FS
setHidden
in class FS_POSIX
IOException
public String readSymLink(File path) throws IOException
FS
readSymLink
in class FS
IOException
public void createSymLink(File path, String target) throws IOException
FS
createSymLink
in class FS
IOException
public FS.Attributes getAttributes(File path)
getAttributes
in class FS
public File normalize(File file)
FS
Copyright © 2014. All rights reserved.