|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.jgit.util.FS
public abstract class FS
Abstraction to support various file system operations not in Java.
| Field Summary | |
|---|---|
static FS |
INSTANCE
The implementation selected for this operating system and JRE. |
| Constructor Summary | |
|---|---|
FS()
|
|
| Method Summary | |
|---|---|
abstract boolean |
canExecute(java.io.File f)
Determine if the file is executable (or not). |
static java.io.File |
resolve(java.io.File dir,
java.lang.String name)
Resolve this file to its actual path name that the JRE can use. |
protected java.io.File |
resolveImpl(java.io.File dir,
java.lang.String name)
Resolve this file to its actual path name that the JRE can use. |
abstract boolean |
setExecute(java.io.File f,
boolean canExec)
Set a file to be executable by the user. |
abstract boolean |
supportsExecute()
Does this operating system and JRE support the execute flag on files? |
static java.io.File |
userHome()
Determine the user's home directory (location where preferences are). |
protected java.io.File |
userHomeImpl()
Determine the user's home directory (location where preferences are). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final FS INSTANCE
| Constructor Detail |
|---|
public FS()
| Method Detail |
|---|
public abstract boolean supportsExecute()
public abstract boolean canExecute(java.io.File f)
Not all platforms and JREs support executable flags on files. If the feature is unsupported this method will always return false.
f - abstract path to test.
public abstract boolean setExecute(java.io.File f,
boolean canExec)
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.
f - path to modify the executable status of.canExec - true to enable execution; false to disable it.
public static java.io.File resolve(java.io.File dir,
java.lang.String name)
This method can be relatively expensive. Computing a translation may require forking an external process per path name translated. Callers should try to minimize the number of translations necessary by caching the results.
Not all platforms and JREs require path name translation. Currently only Cygwin on Win32 require translation for Cygwin based paths.
dir - directory relative to which the path name is.name - path name to translate.
new File(dir,name) if this
platform does not require path name translation.
protected java.io.File resolveImpl(java.io.File dir,
java.lang.String name)
This method can be relatively expensive. Computing a translation may require forking an external process per path name translated. Callers should try to minimize the number of translations necessary by caching the results.
Not all platforms and JREs require path name translation. Currently only Cygwin on Win32 require translation for Cygwin based paths.
dir - directory relative to which the path name is.name - path name to translate.
new File(dir,name) if this
platform does not require path name translation.public static java.io.File userHome()
This method can be expensive on the first invocation if path name translation is required. Subsequent invocations return a cached result.
Not all platforms and JREs require path name translation. Currently only Cygwin on Win32 requires translation of the Cygwin HOME directory.
protected java.io.File userHomeImpl()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||