Top Description Fields Constructors Methods
org.eclipse.jgit.util

public Class FS_Win32

extends FS
Class Inheritance
Known Direct Subclasses
org.eclipse.jgit.util.FS_Win32_Cygwin
Imports
java.io.File, .IOException, java.nio.file.FileVisitOption, .FileVisitResult, .Files, .LinkOption, .Path, .SimpleFileVisitor, java.nio.file.attribute.BasicFileAttributes, java.util.ArrayList, .Arrays, .EnumSet, .List, org.eclipse.jgit.errors.CommandFailedException, org.eclipse.jgit.treewalk.FileTreeIterator.FileEntry, .FileTreeIterator.FileModeStrategy, .WorkingTreeIterator.Entry, org.slf4j.Logger, .LoggerFactory

FS implementation for Windows
Since
3.0

Field Summary

Modifier and TypeField and Description
private static final Logger
Inherited from org.eclipse.jgit.util.FS:
DETECTEDNO_ENTRIES

Constructor Summary

AccessConstructor and Description
public
FS_Win32()

Constructor

protected
FS_Win32(FS
instance whose attributes to copy
src
)

Constructor

Method Summary

Modifier and TypeMethod and Description
public boolean
canExecute(File
abstract path to test.
f
)

Implements abstract org.eclipse.jgit.util.FS.canExecute.

Determine if the file is executable (or not).

protected File
discoverGitExe()

Implements abstract org.eclipse.jgit.util.FS.discoverGitExe.

Discover the path to the Git executable.

public FS.Attributes
getAttributes(File
a java.io.File object.
path
)

Overrides org.eclipse.jgit.util.FS.getAttributes.

Get the file attributes we care for.

public boolean
isCaseSensitive()

Implements abstract org.eclipse.jgit.util.FS.isCaseSensitive.

Is this file system case sensitive

public WorkingTreeIterator.Entry[]
list(File
to get the children of
directory
,
FileTreeIterator.FileModeStrategy
to use to calculate the git mode of a child
fileModeStrategy
)

Overrides org.eclipse.jgit.util.FS.list.

Enumerates children of a directory.

public FS
newInstance()

Implements abstract org.eclipse.jgit.util.FS.newInstance.

Create a new instance of the same type of FS.

public boolean
retryFailedLockFileCommit()

Implements abstract org.eclipse.jgit.util.FS.retryFailedLockFileCommit.

Does this file system have problems with atomic renames?

public ProcessBuilder
runInShell(String
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
)

Implements abstract org.eclipse.jgit.util.FS.runInShell.

Initialize a ProcessBuilder to run a command using the system shell.

public boolean
setExecute(File
path to modify the executable status of.
f
,
boolean
true to enable execution; false to disable it.
canExec
)

Implements abstract org.eclipse.jgit.util.FS.setExecute.

Set a file to be executable by the user.

public boolean
supportsExecute()

Implements abstract org.eclipse.jgit.util.FS.supportsExecute.

Does this operating system and JRE support the execute flag on files?

protected File
userHomeImpl()

Overrides org.eclipse.jgit.util.FS.userHomeImpl.

Determine the user's home directory (location where preferences are).

Inherited from org.eclipse.jgit.util.FS:
createNewFileAtomiccreateSymLinkdeletedetectdetectdiscoverGitSystemConfigexecuteexistsfileAttributesfindHookgetCommonDirgetFileStoreAttributesgetGitSystemConfiginternalRunHookIfPresentisDirectoryisFileisHiddenisSymLinklastModifiedInstantlastModifiedInstantlengthnormalizenormalizereadPipereadPipereadSymLinkrelativizeresolveresolveGrandparentFilerunHookIfPresentrunHookIfPresentrunProcessrunProcesssearchPathsetGitSystemConfigsetHiddensetLastModifiedsetUserHomeshellQuotesupportsAtomicCreateNewFilesupportsSymlinksuserHome

Field Detail

LOGback to summary
private static final Logger LOG

Hides org.eclipse.jgit.util.FS.LOG.

Constructor Detail

FS_Win32back to summary
public FS_Win32()

Constructor

FS_Win32back to summary
protected FS_Win32(FS src)

Constructor

Parameters
src:FS

instance whose attributes to copy

Method Detail

canExecuteback to summary
public boolean canExecute(File f)

Implements abstract org.eclipse.jgit.util.FS.canExecute.

Doc from org.eclipse.jgit.util.FS.canExecute.

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.

Parameters
f:File

abstract path to test.

Returns:boolean

true if the file is believed to be executable by the user.

Annotations
@Override
discoverGitExeback to summary
protected File discoverGitExe()

Implements abstract org.eclipse.jgit.util.FS.discoverGitExe.

Doc from org.eclipse.jgit.util.FS.discoverGitExe.

Discover the path to the Git executable.

Returns:File

the path to the Git executable or null if it cannot be determined.

Annotations
@Override
getAttributesback to summary
public FS.Attributes getAttributes(File path)

Overrides org.eclipse.jgit.util.FS.getAttributes.

Doc from org.eclipse.jgit.util.FS.getAttributes.

Get the file attributes we care for.

Parameters
path:File

a java.io.File object.

Returns:FS.Attributes

the file attributes we care for.

Annotations
@Override
isCaseSensitiveback to summary
public boolean isCaseSensitive()

Implements abstract org.eclipse.jgit.util.FS.isCaseSensitive.

Doc from org.eclipse.jgit.util.FS.isCaseSensitive.

Is this file system case sensitive

Returns:boolean

true if this implementation is case sensitive

Annotations
@Override
listback to summary
public WorkingTreeIterator.Entry[] list(File directory, FileTreeIterator.FileModeStrategy fileModeStrategy)

Overrides org.eclipse.jgit.util.FS.list.

Doc from org.eclipse.jgit.util.FS.list.

Enumerates children of a directory.

Parameters
directory:File

to get the children of

fileModeStrategy:FileTreeIterator.FileModeStrategy

to use to calculate the git mode of a child

Returns:WorkingTreeIterator.Entry[]

an array of entries for the children

Annotations
@Override
newInstanceback to summary
public FS newInstance()

Implements abstract org.eclipse.jgit.util.FS.newInstance.

Doc from org.eclipse.jgit.util.FS.newInstance.

Create a new instance of the same type of FS.

Returns:FS

a new instance of the same type of FS.

Annotations
@Override
retryFailedLockFileCommitback to summary
public boolean retryFailedLockFileCommit()

Implements abstract org.eclipse.jgit.util.FS.retryFailedLockFileCommit.

Doc from org.eclipse.jgit.util.FS.retryFailedLockFileCommit.

Does this file system have problems with atomic renames?

Returns:boolean

true if the caller should retry a failed rename of a lock file.

Annotations
@Override
runInShellback to summary
public ProcessBuilder runInShell(String cmd, String[] args)

Implements abstract org.eclipse.jgit.util.FS.runInShell.

Doc from org.eclipse.jgit.util.FS.runInShell.

Initialize a ProcessBuilder to run a command using the system shell.

Parameters
cmd:String

command to execute. This string should originate from the end-user, and thus is platform specific.

args:String[]

arguments to pass to command. These should be protected from shell evaluation.

Returns:ProcessBuilder

a partially completed process builder. Caller should finish populating directory, environment, and then start the process.

Annotations
@Override
setExecuteback to summary
public boolean setExecute(File f, boolean canExec)

Implements abstract org.eclipse.jgit.util.FS.setExecute.

Doc from org.eclipse.jgit.util.FS.setExecute.

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.

Parameters
f:File

path to modify the executable status of.

canExec:boolean

true to enable execution; false to disable it.

Returns:boolean

true if the change succeeded; false otherwise.

Annotations
@Override
supportsExecuteback to summary
public boolean supportsExecute()

Implements abstract org.eclipse.jgit.util.FS.supportsExecute.

Doc from org.eclipse.jgit.util.FS.supportsExecute.

Does this operating system and JRE support the execute flag on files?

Returns:boolean

true if this implementation can provide reasonably accurate executable bit information; false otherwise.

Annotations
@Override
userHomeImplback to summary
protected File userHomeImpl()

Overrides org.eclipse.jgit.util.FS.userHomeImpl.

Doc from org.eclipse.jgit.util.FS.userHomeImpl.

Determine the user's home directory (location where preferences are).

Returns:File

the user's home directory; null if the user does not have one.

Annotations
@Override