Class FileTreeIterator.NoGitlinksStrategy

  • All Implemented Interfaces:
    FileTreeIterator.FileModeStrategy
    Enclosing class:
    FileTreeIterator

    public static class FileTreeIterator.NoGitlinksStrategy
    extends java.lang.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
    • Constructor Detail

      • NoGitlinksStrategy

        public NoGitlinksStrategy()
    • Method Detail

      • getMode

        public FileMode getMode​(java.io.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 interface FileTreeIterator.FileModeStrategy
        Parameters:
        f - the file to return a FileMode for
        attributes - the attributes of a file
        Returns:
        a FileMode indicating whether the file is a regular file, a directory, a gitlink, etc.