Class NoRegExpMatching

java.lang.Object
com.sshtools.client.sftp.NoRegExpMatching
All Implemented Interfaces:
RegularExpressionMatching

public class NoRegExpMatching extends Object implements RegularExpressionMatching
Implements the RegularExpressionMatching Interface.
Performs no regular expression matching so:
matchFilesWithPattern() simply returns the files parameter it is passed as an argument
matchFileNamesWithPattern() simply returns a 1 element array containing the filename on the first element of the file[] argument passed to it.
  • Constructor Details

    • NoRegExpMatching

      public NoRegExpMatching()
  • Method Details

    • matchFileNamesWithPattern

      public String[] matchFileNamesWithPattern(com.sshtools.common.files.AbstractFile[] files, String fileNameRegExp) throws com.sshtools.common.ssh.SshException, com.sshtools.common.sftp.SftpStatusException, IOException, com.sshtools.common.permissions.PermissionDeniedException
      opens and returns the requested filename string
      Specified by:
      matchFileNamesWithPattern in interface RegularExpressionMatching
      Returns:
      String[]
      Throws:
      com.sshtools.common.sftp.SftpStatusException
      com.sshtools.common.permissions.PermissionDeniedException
      IOException
      com.sshtools.common.ssh.SshException
    • matchFilesWithPattern

      public SftpFile[] matchFilesWithPattern(SftpFile[] files, String fileNameRegExp) throws com.sshtools.common.sftp.SftpStatusException, com.sshtools.common.ssh.SshException
      returns files
      Specified by:
      matchFilesWithPattern in interface RegularExpressionMatching
      Returns:
      SftpFile[]
      Throws:
      com.sshtools.common.sftp.SftpStatusException
      com.sshtools.common.ssh.SshException