Package org.eclipse.jgit.treewalk
Class FileTreeIterator.NoGitlinksStrategy
java.lang.Object
org.eclipse.jgit.treewalk.FileTreeIterator.NoGitlinksStrategy
- All Implemented Interfaces:
FileTreeIterator.FileModeStrategy
- Enclosing class:
FileTreeIterator
public static class FileTreeIterator.NoGitlinksStrategy
extends Object
implements FileTreeIterator.FileModeStrategy
A FileModeStrategy that implements native git's DIR_NO_GITLINKS
behavior. This is the same as the default FileModeStrategy, except
all directories will be treated as directories regardless of whether
or not they contain a .git directory or file.
- Since:
- 4.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FileTreeIterator.NoGitlinksStrategy
a singleton instance of the default FileModeStrategy -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetMode
(File f, FS.Attributes attributes) Compute the FileMode for a given File, based on its attributes.
-
Field Details
-
INSTANCE
a singleton instance of the default FileModeStrategy
-
-
Constructor Details
-
NoGitlinksStrategy
public NoGitlinksStrategy()
-
-
Method Details
-
getMode
Description copied from interface:FileTreeIterator.FileModeStrategy
Compute the FileMode for a given File, based on its attributes.- Specified by:
getMode
in interfaceFileTreeIterator.FileModeStrategy
- Parameters:
f
- the file to return a FileMode forattributes
- the attributes of a file- Returns:
- a FileMode indicating whether the file is a regular file, a directory, a gitlink, etc.
-