Interface DescendantFileSource

    • Method Detail

      • getDescendant

        DescendantFileSource getDescendant​(String relativePath)
        Return a DescendantFileSource representing the descendant directory specified by the relative path.
        Parameters:
        relativePath - the relative path to the descendant directory.
        Returns:
        a FileLocator representing the descendant root directory or null if the path is null or the descendant directory doesn't exist or isn't a directory (or isn't a descendant).
      • getRootDirectory

        File getRootDirectory()
        Return the root directory represented by this FileLocator as a java.io.File.
        Returns:
        the root directory represented by this FileLocator.
      • getRootDirectoryPath

        String getRootDirectoryPath()
        Return the path of the root directory represented by this FileLocator.
        Returns:
        the path of the root directory represented by this FileLocator.
      • isDescendant

        boolean isDescendant​(File file)
        Return true if the given File is an existing descendant of the root directory, false otherwise.
        Parameters:
        file - the File to be checked if it is a descendant.
        Returns:
        true if the given file is an existing descendant, false otherwise.
      • isDescendant

        boolean isDescendant​(String filePath)
        Return true if the given file path is an existing descendant of the root directory, false otherwise.
        Parameters:
        filePath - the file path to be checked if it is a descendant.
        Returns:
        true if the given file path represents an existing descendant, false otherwise.
      • getRelativePath

        String getRelativePath​(File file)
        Return the path relative to the root directory that represents the given descendant file.
        Parameters:
        file - the File for which the relative path is to be determined.
        Returns:
        the path relative to the root directory that represents the given descendant file or null if the given file is null or not a descendant.
      • getRelativePath

        String getRelativePath​(String filePath)
        Return the path relative to the root directory that represents the given descendant file path.
        Parameters:
        filePath - the file path for which the relative path is to be determined.
        Returns:
        the path relative to the root directory that represents the given descendant file path or null if the given file path is null or not a descendant.