Class NameMatchingDelegate


  • public class NameMatchingDelegate
    extends Object
    Wraps the logic around file/folder name matching
    Author:
    Luke Shannon (Github: lshannon)
    • Method Detail

      • doesNameMatch

        public boolean doesNameMatch​(String name)
        Returns a true is a file/folder name matches. Regex is applied if 'targetFileNamePatternString' was set when this object was created
        Parameters:
        name - of the file/folder
        Returns:
        true if its a match, false is not
      • isThisATargetFileExtension

        public boolean isThisATargetFileExtension​(File file)
        Determines if a Target File Extension is a match. If 'targetFileExtensionPatternString' is specified at creation, then Regex will be applied when matching
        Parameters:
        file - the file that the extension check will be applied too
        Returns:
        true if the file extension is a match, false if not. Regex is applied if 'targetFileExtensionPatternString' was specified
      • shouldProcessFile

        public boolean shouldProcessFile​(File currentFile)
        Checks if a File is a target file for processing by the Clue. This check is based on the ignoreFileNamePattern and the targetFileExtensionPattern
        Parameters:
        currentFile - file to be processed
        Returns:
        true if it should be processed, false if it should be ignored