Class FlexFindPathsUtils

java.lang.Object
flexagon.ff.common.core.utils.FlexFindPathsUtils

public class FlexFindPathsUtils extends Object
A class to find files or directories based on name and/or extension.
  • Constructor Details

    • FlexFindPathsUtils

      public FlexFindPathsUtils(Path pFile)
  • Method Details

    • findFileWithName

      public List<Path> findFileWithName(String pMatchString)
      Recursively searches for files matching given file name. Name must match the entire file name including extension
      Parameters:
      pMatchString - Full Filename
      Returns:
      List of Paths matching the file name
    • findFilesEndingWith

      public List<Path> findFilesEndingWith(String pMatchString)
      Recursively searches for files that end with this substring. You could pass in out and get shout, my.out. or pass in .out to get just my.out
      Parameters:
      pMatchString - File suffix
      Returns:
      List of files with file name ending with given string
    • findFilesMatchingRegex

      public List<Path> findFilesMatchingRegex(String pPattern)
    • findDirectoryWithName

      public List<Path> findDirectoryWithName(String pMatchString)
      Recursive directory Search. This is not used for files, only folders.