| Modifier and Type | Class and Description |
|---|---|
| public static class | FS.
File attributes we typically care for. |
| public static class | FS.
Result of an executed process. |
| public static class | FS.
Attributes of FileStores on this system |
| public static class | FS.
This class creates FS instances. |
| private static class | |
| private static class | |
| public static class | FS.
A token representing a file created by
|
| private static class | FS.
This runnable will consume an input stream's content into an output stream as soon as it gets available. |
| Modifier and Type | Field and Description |
|---|---|
| public static final FS | DETECTED
The auto-detected implementation selected for this operating system and JRE. |
| private static final Pattern | |
| private static volatile FS. | |
| private volatile FS. | |
| private static final Logger | |
| protected static final WorkingTreeIterator. | NO_ENTRIES
An empty array of entries, suitable as a return value for
|
| private volatile Boolean | |
| private volatile FS. | |
| private static final Pattern |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public abstract boolean | Returns: true if the file is believed to be executable by the user.abstract path to test. f)Determine if the file is executable (or not). |
| public FS. | Returns: LockToken this token must be closed after the created file was deletedthe file to be created path)Create a new file. |
| public void | createSymLink(File
a path, String java. object.target path of the symlink target)Create a symbolic link |
| private File | |
| public void | |
| public static FS | Returns: detected file system abstractionAuto-detect the appropriate file system abstraction. |
| public static FS | Returns: detected file system abstraction
Auto-detect the appropriate file system abstraction, taking into account the presence of a Cygwin installation on the system. |
| private void | |
| protected abstract File | Returns: the path to the Git executable ornull if it cannot be
determined.Discover the path to the Git executable. |
| protected File | Returns: the path to the system-wide Git configuration file ornull if it cannot be determined.Discover the path to the system-wide Git configuration file |
| public FS. | Returns: The result of the executed commandThe command to be executed pb, InputStream The standard input stream passed to the process in)Execute a command defined by a |
| public boolean | Returns: true if path existsa path)java. object.Tests if the path exists, in case of a symbolic link, true even if the target does not exist |
| public BasicFileAttributes | Returns: BasicFileAttributes of the filethe file file)Return all the attributes of a file, without following symbolic links. |
| public File | Returns: Thejava. containing this particular hook if it
exists in the given repository, null otherwise.The repository within which to find a hook. repository, String The name of the hook we're trying to find. hookName)Tries to find a hook matching the given one in the given repository. |
| public FS. | Returns: the file attributes we care for.a path)java. object.Get the file attributes we care for. |
| public File | |
| public static FS. | Returns: measured filesystem timestamp resolutionthe directory under which the probe file will be created to
measure the timer resolution. dir)Get cached FileStore attributes, if not yet available measure them using a probe file under the given directory. |
| public File | Returns: the currently used path to the system-wide Git configuration file ornull if none has been set.Get the currently used path to the system-wide Git configuration file. |
| private File | |
| private File | |
| protected ProcessResult | Returns: The ProcessResult describing this hook's execution.The repository for which a hook should be run. repository, String The name of the hook to be executed. hookName, String[] Arguments to pass to this hook. Cannot be args, OutputStream null,
but can be an empty array.A print stream on which to redirect the hook's stdout. Can be
outRedirect, OutputStream null, in which case the hook's standard output
will be lost.A print stream on which to redirect the hook's stderr. Can be
errRedirect, String null, in which case the hook's standard error
will be lost.A string to pass on to the standard input of the hook. May be
stdinArgs)null.See
|
| public abstract boolean | Returns: true if this implementation is case sensitiveIs this file system case sensitive |
| public boolean | Returns: true if file is a directory,a path)java. object.Check if path is a directory. |
| public boolean | Returns: true if path represents a regular filea path)java. object.Examine if path represents a regular file. |
| public boolean | Returns: true if path is hidden, either starts with . on unix or has the hidden attribute in windowsa path)java. object.Whether path is hidden, either starts with . |
| public boolean | Returns: true if the path is a symbolic link (and we support these)a path)java. object.Whether the path is a symbolic link (and we support these). |
| public Instant | Returns: last modified time of pa p)Path object.Get the last modified time of a file system object. |
| public Instant | Returns: last modified time of pa f)File object.Get the last modified time of a file system object. |
| public long | Returns: length of a filea path)java. object.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. |
| public WorkingTreeIterator. | Returns: an array of entries for the childrento get the children of directory, FileTreeIterator.to use to calculate the git mode of a child fileModeStrategyEnumerates children of a directory. |
| private long | |
| public abstract FS | Returns: a new instance of the same type of FS.Create a new instance of the same type of FS. |
| public File | Returns: NFC-format Filea file)java. object.Normalize the unicode path to composed form. |
| public String | |
| private long | |
| protected static String | |
| protected static String | Returns: the one-line output of the command ornull if there is
noneWorking directory for the command dir, String[] as component array command, String to be used to parse the command's output encoding, Map<String, String> Map of environment variables to be merged with those of the
current process env)Execute a command and return a single line of output as a String |
| public String | Returns: target of link or nulla path)java. object.Check if a file is a symbolic link and read it |
| public String | Returns: A relative path that, when resolved againstbase,
will yield the original other.The path against which base, String other should be
relativized.The path that will be made relative to other)base.See
|
| public File | |
| protected static File | Returns: the parent directory of this file's parent directory ornull in case there's no grandparent directorya grandchild)java. object.Get the parent directory of this file's parent directory |
| public abstract boolean | Returns: true if the caller should retry a failed rename of a lock file.Does this file system have problems with atomic renames? |
| public ProcessResult | Returns: The ProcessResult describing this hook's execution.The repository for which a hook should be run. repository, String The name of the hook to be executed. hookName, String[] Arguments to pass to this hook. Cannot be args)null,
but can be an empty array.Checks whether the given hook is defined for the given repository, then runs it with the given arguments. |
| public ProcessResult | Returns: The ProcessResult describing this hook's execution.The repository for which a hook should be run. repository, String The name of the hook to be executed. hookName, String[] Arguments to pass to this hook. Cannot be args, OutputStream null,
but can be an empty array.A print stream on which to redirect the hook's stdout. Can be
outRedirect, OutputStream null, in which case the hook's standard output
will be lost.A print stream on which to redirect the hook's stderr. Can be
errRedirect, String null, in which case the hook's standard error
will be lost.A string to pass on to the standard input of the hook. May be
stdinArgs)null.Checks whether the given hook is defined for the given repository, then runs it with the given arguments. |
| public abstract ProcessBuilder | Returns: a partially completed process builder. Caller should finish populating directory, environment, and then start the process.command to execute. This string should originate from the
end-user, and thus is platform specific. cmd, String[] arguments to pass to command. These should be protected from
shell evaluation. args)Initialize a ProcessBuilder to run a command using the system shell. |
| public int | Returns: the exit value of this process.The process builder configured for this process. processBuilder, OutputStream A OutputStream on which to redirect the processes stdout. Can
be outRedirect, OutputStream null, in which case the processes standard
output will be lost.A OutputStream on which to redirect the processes stderr. Can
be errRedirect, String null, in which case the processes standard
error will be lost.A string to pass on to the standard input of the hook. Can be
stdinArgs)null.Runs the given process until termination, clearing its stdout and stderr streams on-the-fly. |
| public int | Returns: the return code of this process.The process builder configured for this process. processBuilder, OutputStream An OutputStream on which to redirect the processes stdout. Can
be outRedirect, OutputStream null, in which case the processes standard
output will be lost.An OutputStream on which to redirect the processes stderr. Can
be errRedirect, InputStream null, in which case the processes standard
error will be lost.An InputStream from which to redirect the processes stdin. Can
be inRedirect)null, in which case the process doesn't get
any data over stdin. It is assumed that the whole InputStream
will be consumed by the process. The method will close the
inputstream after all bytes are read.Runs the given process until termination, clearing its stdout and stderr streams on-the-fly. |
| private File | |
| protected static File | Returns: the first match found, or nullList of paths to search separated by File.pathSeparator path, String... Files to search for in the given path lookFor)Searches the given path to see if it contains one of the given files. |
| public abstract boolean | Returns: true if the change succeeded; false otherwise.path to modify the executable status of. f, boolean true to enable execution; false to disable it. canExec)Set a file to be executable by the user. |
| public FS | Returns: thisthe path to the config file. configFile)Set the path to the system-wide Git configuration file to use. |
| public void | setHidden(File
a path, boolean java. object.whether to set the file hidden hidden)Set the hidden attribute for file whose name starts with a period. |
| public void | setLastModified(Path
a p, Instant Path object.last modified time time)Set the last modified time of a file system object. |
| public FS | Returns: this.the location of the user's preferences; null if there is no
home directory for the current user. path)Set the user's home directory location. |
| pack-priv String | Returns: the quoted stringthe String to quote cmd)Quote a string (such as a file system path obtained from a Java
|
| private static boolean | Returns: true if the pool has been properly shutdown,
false otherwise.the pool to shutdown pool)Shuts down an |
| public boolean | Returns: true if this implementation support atomic creation of new Files byjava.Does this file system support atomic file creation via java.io.File#createNewFile()? |
| public abstract boolean | Returns: true if this implementation can provide reasonably accurate executable bit information; false otherwise.Does this operating system and JRE support the execute flag on files? |
| public boolean | Returns: true if symbolic links may be usedDoes this operating system and JRE supports symbolic links. |
| public File | Returns: the user's home directory; null if the user does not have one.Determine the user's home directory (location where preferences are). |
| protected File | Returns: the user's home directory; null if the user does not have one.Determine the user's home directory (location where preferences are). |