java.lang.Object
org.eclipse.jgit.util.FS
org.eclipse.jgit.util.FS_Win32
- Direct Known Subclasses:
FS_Win32_Cygwin
FS implementation for Windows
- Since:
- 3.0
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jgit.util.FS
FS.Attributes, FS.ExecutionResult, FS.FileStoreAttributes, FS.FSFactory, FS.LockToken -
Field Summary
Fields inherited from class org.eclipse.jgit.util.FS
DETECTED, NO_ENTRIES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanExecute(File f) Determine if the file is executable (or not).protected FileDiscover the path to the Git executable.getAttributes(File path) Get the file attributes we care for.booleanIs this file system case sensitivelist(File directory, FileTreeIterator.FileModeStrategy fileModeStrategy) Enumerates children of a directory.Create a new instance of the same type of FS.booleanDoes this file system have problems with atomic renames?runInShell(String cmd, String[] args) Initialize a ProcessBuilder to run a command using the system shell.booleansetExecute(File f, boolean canExec) Set a file to be executable by the user.booleanDoes this operating system and JRE support the execute flag on files?protected FileDetermine the user's home directory (location where preferences are).Methods inherited from class org.eclipse.jgit.util.FS
createNewFile, createNewFileAtomic, createSymLink, delete, detect, detect, discoverGitSystemConfig, execute, exists, fileAttributes, findHook, getFileStoreAttributes, getGitSystemConfig, internalRunHookIfPresent, isDirectory, isFile, isHidden, isSymLink, lastModified, lastModifiedInstant, lastModifiedInstant, length, normalize, normalize, readPipe, readPipe, readSymLink, relativize, resolve, resolveGrandparentFile, runHookIfPresent, runHookIfPresent, runProcess, runProcess, searchPath, setAsyncFileStoreAttributes, setGitSystemConfig, setHidden, setLastModified, setLastModified, setUserHome, supportsAtomicCreateNewFile, supportsSymlinks, userHome
-
Constructor Details
-
FS_Win32
public FS_Win32()Constructor -
FS_Win32
Constructor- Parameters:
src- instance whose attributes to copy
-
-
Method Details
-
newInstance
Description copied from class:FSCreate a new instance of the same type of FS.- Specified by:
newInstancein classFS- Returns:
- a new instance of the same type of FS.
-
supportsExecute
public boolean supportsExecute()Description copied from class:FSDoes this operating system and JRE support the execute flag on files?- Specified by:
supportsExecutein classFS- Returns:
- true if this implementation can provide reasonably accurate executable bit information; false otherwise.
-
canExecute
Description copied from class:FSDetermine 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
fis a symbolic link this method returns false, rather than the state of the executable flags on the target file.- Specified by:
canExecutein classFS- Parameters:
f- abstract path to test.- Returns:
- true if the file is believed to be executable by the user.
-
setExecute
Description copied from class:FSSet 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:
setExecutein classFS- 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:FSIs this file system case sensitive- Specified by:
isCaseSensitivein classFS- Returns:
- true if this implementation is case sensitive
-
retryFailedLockFileCommit
public boolean retryFailedLockFileCommit()Description copied from class:FSDoes this file system have problems with atomic renames?- Specified by:
retryFailedLockFileCommitin classFS- Returns:
- true if the caller should retry a failed rename of a lock file.
-
list
public WorkingTreeIterator.Entry[] list(File directory, FileTreeIterator.FileModeStrategy fileModeStrategy) Description copied from class:FSEnumerates children of a directory. -
discoverGitExe
Description copied from class:FSDiscover the path to the Git executable.- Specified by:
discoverGitExein classFS- Returns:
- the path to the Git executable or
nullif it cannot be determined.
-
userHomeImpl
Description copied from class:FSDetermine the user's home directory (location where preferences are).- Overrides:
userHomeImplin classFS- Returns:
- the user's home directory; null if the user does not have one.
-
runInShell
Description copied from class:FSInitialize a ProcessBuilder to run a command using the system shell.- Specified by:
runInShellin classFS- 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.
-
getAttributes
Description copied from class:FSGet the file attributes we care for.- Overrides:
getAttributesin classFS- Parameters:
path- aFileobject.- Returns:
- the file attributes we care for.
-