Class FS_Win32

  • Direct Known Subclasses:
    FS_Win32_Cygwin

    public class FS_Win32
    extends FS
    FS implementation for Windows
    Since:
    3.0
    • Constructor Detail

      • FS_Win32

        public FS_Win32()
        Constructor
      • FS_Win32

        protected FS_Win32​(FS src)
        Constructor
        Parameters:
        src - instance whose attributes to copy
    • Method Detail

      • newInstance

        public FS newInstance()
        Specified by:
        newInstance in class FS
        Returns:
        a new instance of the same type of FS.
      • supportsExecute

        public boolean supportsExecute()
        Description copied from class: FS
        Does this operating system and JRE support the execute flag on files?
        Specified by:
        supportsExecute in class FS
        Returns:
        true if this implementation can provide reasonably accurate executable bit information; false otherwise.
      • canExecute

        public boolean canExecute​(java.io.File f)
        Description copied from class: FS
        Determine if the file is executable (or not).

        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.

        Specified by:
        canExecute in class FS
        Parameters:
        f - abstract path to test.
        Returns:
        true if the file is believed to be executable by the user.
      • setExecute

        public boolean setExecute​(java.io.File f,
                                  boolean canExec)
        Description copied from class: FS
        Set a file to be executable by the user.

        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.

        Specified by:
        setExecute in class FS
        Parameters:
        f - path to modify the executable status of.
        canExec - true to enable execution; false to disable it.
        Returns:
        true if the change succeeded; false otherwise.
      • 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
      • retryFailedLockFileCommit

        public boolean retryFailedLockFileCommit()
        Description copied from class: FS
        Does this file system have problems with atomic renames?
        Specified by:
        retryFailedLockFileCommit in class FS
        Returns:
        true if the caller should retry a failed rename of a lock file.
      • discoverGitPrefix

        protected java.io.File discoverGitPrefix()
        Specified by:
        discoverGitPrefix in class FS
        Returns:
        the $prefix directory C Git would use.
      • userHomeImpl

        protected java.io.File userHomeImpl()
        Description copied from class: FS
        Determine the user's home directory (location where preferences are).
        Overrides:
        userHomeImpl in class FS
        Returns:
        the user's home directory; null if the user does not have one.
      • 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.