public abstract class FS_POSIX extends FS
FS.Attributes, FS.FSFactory
Modifier | Constructor and Description |
---|---|
protected |
FS_POSIX()
Default constructor
|
protected |
FS_POSIX(FS src)
Constructor
|
Modifier and Type | Method and Description |
---|---|
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.
|
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
protected FS_POSIX()
protected FS_POSIX(FS src)
src
- FS to copy some settings fromprotected File discoverGitPrefix()
discoverGitPrefix
in class FS
public boolean isCaseSensitive()
FS
isCaseSensitive
in class FS
public void setHidden(File path, boolean hidden) throws IOException
FS
setHidden
in class FS
IOException
public ProcessBuilder runInShell(String cmd, String[] args)
FS
runInShell
in class FS
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.public ProcessResult runIfPresent(Repository repository, Hook hook, String[] args, PrintStream outRedirect, PrintStream errRedirect, String stdinArgs) throws JGitInternalException
FS
runIfPresent
in class FS
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
.JGitInternalException
- if we fail to run the hook somehow. Causes may include an
interrupted process or I/O errors.Copyright © 2015. All rights reserved.