Package org.eclipse.jgit.util

## Class FS_POSIX

- java.lang.Object
- - org.eclipse.jgit.util.FS
  - - org.eclipse.jgit.util.FS_POSIX

Direct Known Subclasses:
  `FS_POSIX_Java5`, `FS_POSIX_Java6`

    public abstract class FS_POSIX
    extends FS

Base FS for POSIX based systems

Since:
  3.0

### Nested Class Summary

### Nested classes/interfaces inherited from class org.eclipse.jgit.util.FS

`FS.Attributes, FS.FSFactory`

### Field Summary

### Fields inherited from class org.eclipse.jgit.util.FS

`DETECTED`

### Constructor Summary

Constructors
`protected` `FS_POSIX()` Default constructor
`protected` `FS_POSIX​(FS src)` Constructor

### Method Summary

All Methods Instance Methods Concrete Methods
`protected File` `discoverGitPrefix()`
`boolean` `isCaseSensitive()` Is this file system case sensitive
`ProcessResult` `runIfPresent​(Repository repository, Hook hook, 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 ProcesssBuilder to run a command using the system shell.
`void` `setHidden​(File path, boolean hidden)` Set the hidden attribute for file whose name starts with a period.

### Methods inherited from class org.eclipse.jgit.util.FS

`canExecute, createSymLink, delete, detect, detect, exists, findHook, getAttributes, gitPrefix, internalRunIfPresent, isDirectory, isFile, isHidden, isSymLink, lastModified, length, newInstance, normalize, normalize, readPipe, readSymLink, relativize, resolve, retryFailedLockFileCommit, runIfPresent, runProcess, searchPath, setExecute, setGitPrefix, setLastModified, setUserHome, supportsExecute, supportsSymlinks, userHome, userHomeImpl`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### FS_POSIX

    protected FS_POSIX()

Default constructor

#### FS_POSIX

    protected FS_POSIX​(FS src)

Constructor

Parameters:
  `src` - FS to copy some settings from

### Method Detail

#### discoverGitPrefix

    protected File discoverGitPrefix()

Specified by:
  `discoverGitPrefix` in class `FS`
Returns:
  the $prefix directory C Git would use.

#### isCaseSensitive

    public boolean isCaseSensitive()

Description copied from class: `FS`
Is this file system case sensitive

Specified by:
  `isCaseSensitive` in class `FS`
Returns:
  true if this implementation is case sensitive

#### setHidden

    public void setHidden​(File path,
                          boolean hidden)
                   throws IOException

Description copied from class: `FS`
Set the hidden attribute for file whose name starts with a period.

Overrides:
  `setHidden` in class `FS`
Throws:
  `IOException`

#### runInShell

    public ProcessBuilder runInShell​(String cmd,
                                     String[] args)

Description copied from class: `FS`
Initialize a ProcesssBuilder to run a command using the system shell.

Specified by:
  `runInShell` in class `FS`
Parameters:
  `cmd` - 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.
Returns:
  a partially completed process builder. Caller should finish populating directory, environment, and then start the process.

#### runIfPresent

    public ProcessResult runIfPresent​(Repository repository,
                                      Hook hook,
                                      String[] args,
                                      PrintStream outRedirect,
                                      PrintStream errRedirect,
                                      String stdinArgs)
                               throws JGitInternalException

Description copied from class: `FS`
Checks whether the given hook is defined for the given repository, then runs it with the given arguments.

Overrides:
  `runIfPresent` in class `FS`
Parameters:
  `repository` - The repository for which a hook should be run.
  `hook` - 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`.
Returns:
  The ProcessResult describing this hook's execution.
Throws:
  `JGitInternalException` - if we fail to run the hook somehow. Causes may include an interrupted process or I/O errors.
Since:
  3.7