public class FS_POSIX extends FS
FS.Attributes, FS.ExecutionResult, FS.FSFactory| Modifier | Constructor and Description | 
|---|---|
protected  | 
FS_POSIX()
Default constructor. 
 | 
protected  | 
FS_POSIX(FS src)
Constructor 
 | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
canExecute(File f)
Determine if the file is executable (or not). 
 | 
boolean | 
createNewFile(File lock)
Create a new file. 
 | 
protected File | 
discoverGitExe()
Discover the path to the Git executable. 
 | 
File | 
findHook(Repository repository,
        String hookName)
Tries to find a hook matching the given one in the given repository. 
 | 
FS.Attributes | 
getAttributes(File path)
Get the file attributes we care for. 
 | 
boolean | 
isCaseSensitive()
Is this file system case sensitive 
 | 
FS | 
newInstance()
Create a new instance of the same type of FS. 
 | 
File | 
normalize(File file)
Normalize the unicode path to composed form. 
 | 
String | 
normalize(String name)
Normalize the unicode path to composed form. 
 | 
boolean | 
retryFailedLockFileCommit()
Does this file system have problems with atomic renames? 
 | 
ProcessResult | 
runHookIfPresent(Repository repository,
                String hookName,
                String[] args,
                PrintStream outRedirect,
                PrintStream errRedirect,
                String stdinArgs)
Checks whether the given hook is defined for the given repository, then
 runs it with the given arguments. 
 | 
ProcessBuilder | 
runInShell(String cmd,
          String[] args)
Initialize a ProcessBuilder to run a command using the system shell. 
 | 
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 | 
setUmask(int umask)
Set the umask, overriding any value observed from the shell. 
 | 
boolean | 
supportsAtomicCreateNewFile()
Does this file system support atomic file creation via
 java.io.File#createNewFile()? In certain environments (e.g. 
 | 
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. 
 | 
createSymLink, delete, detect, detect, discoverGitSystemConfig, execute, exists, getGitSystemConfig, internalRunHookIfPresent, isDirectory, isFile, isHidden, isSymLink, lastModified, length, readPipe, readPipe, readSymLink, relativize, resolve, resolveGrandparentFile, runHookIfPresent, runProcess, runProcess, searchPath, setGitSystemConfig, setLastModified, setUserHome, userHome, userHomeImplprotected FS_POSIX()
protected FS_POSIX(FS src)
src - FS to copy some settings frompublic FS newInstance()
newInstance in class FSpublic void setUmask(int umask)
umask - mask to apply when creating files.protected File discoverGitExe()
discoverGitExe in class FSnull if it cannot be
         determined.public boolean isCaseSensitive()
isCaseSensitive in class FSpublic boolean supportsExecute()
supportsExecute in class FSpublic boolean canExecute(File f)
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 FSf - abstract path to test.public boolean setExecute(File f, boolean canExecute)
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 FSf - path to modify the executable status of.canExecute - true to enable execution; false to disable it.public ProcessBuilder runInShell(String cmd, String[] args)
runInShell in class FScmd - command to execute. This string should originate from the
            end-user, and thus is platform specific.args - arguments to pass to command. These should be protected from
            shell evaluation.public ProcessResult runHookIfPresent(Repository repository, String hookName, String[] args, PrintStream outRedirect, PrintStream errRedirect, String stdinArgs) throws JGitInternalException
runHookIfPresent in class FSrepository - The repository for which a hook should be run.hookName - The name of the hook to be executed.args - Arguments to pass to this hook. Cannot be null,
            but can be an empty array.outRedirect - A print stream on which to redirect the hook's stdout. Can be
            null, in which case the hook's standard output
            will be lost.errRedirect - A print stream on which to redirect the hook's stderr. Can be
            null, in which case the hook's standard error
            will be lost.stdinArgs - A string to pass on to the standard input of the hook. May be
            null.JGitInternalException - if we fail to run the hook somehow. Causes may include an
             interrupted process or I/O errors.public boolean retryFailedLockFileCommit()
retryFailedLockFileCommit in class FSpublic boolean supportsSymlinks()
supportsSymlinks in class FSpublic void setHidden(File path, boolean hidden) throws IOException
setHidden in class FSpath - a File object.hidden - whether to set the file hiddenIOExceptionpublic FS.Attributes getAttributes(File path)
getAttributes in class FSpath - a File object.public File findHook(Repository repository, String hookName)
public boolean supportsAtomicCreateNewFile()
supportsAtomicCreateNewFile in class FSFile.createNewFile()public boolean createNewFile(File lock) throws IOException
FSFile.createNewFile(). Subclasses
 of this class may take care to provide a safe implementation for this
 even if FS.supportsAtomicCreateNewFile() is falsecreateNewFile in class FSlock - the file to be createdtrue if the file was created, false if
         the file already existedIOExceptionCopyright © 2018 Eclipse JGit Project. All rights reserved.