Class FS_POSIX

    • 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 java.io.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​(java.io.File path,
                              boolean hidden)
                       throws java.io.IOException
        Description copied from class: FS
        Set the hidden attribute for file whose name starts with a period.
        Overrides:
        setHidden in class FS
        Throws:
        java.io.IOException
      • runInShell

        public java.lang.ProcessBuilder runInShell​(java.lang.String cmd,
                                                   java.lang.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,
                                          java.lang.String[] args,
                                          java.io.PrintStream outRedirect,
                                          java.io.PrintStream errRedirect,
                                          java.lang.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