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
Fields Modifier and Type Field Description static FileTreeIterator.NoGitlinksStrategy
INSTANCE
a singleton instance of the default FileModeStrategy
-
Constructor Summary
Constructors Constructor Description NoGitlinksStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileMode
getMode(File f, FS.Attributes attributes)
Compute the FileMode for a given File, based on its attributes.
-
-
-
Field Detail
-
INSTANCE
public static final FileTreeIterator.NoGitlinksStrategy INSTANCE
a singleton instance of the default FileModeStrategy
-
-
Method Detail
-
getMode
public FileMode getMode(File f, FS.Attributes attributes)
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.
-
-