Class SftpSimplePatternFileListFilter

All Implemented Interfaces:
FileListFilter<org.apache.sshd.sftp.client.SftpClient.DirEntry>

public class SftpSimplePatternFileListFilter extends AbstractSimplePatternFileListFilter<org.apache.sshd.sftp.client.SftpClient.DirEntry>
Implementation of AbstractSimplePatternFileListFilter for SFTP.
Since:
2.0
Author:
Mark Fisher, Gary Russell, Artem Bilan
  • Constructor Details

    • SftpSimplePatternFileListFilter

      public SftpSimplePatternFileListFilter(String pattern)
  • Method Details

    • getFilename

      protected String getFilename(org.apache.sshd.sftp.client.SftpClient.DirEntry entry)
      Description copied from class: AbstractSimplePatternFileListFilter
      Subclasses must implement this method to extract the file's name.
      Specified by:
      getFilename in class AbstractSimplePatternFileListFilter<org.apache.sshd.sftp.client.SftpClient.DirEntry>
      Parameters:
      entry - The file.
      Returns:
      The file name.
    • isDirectory

      protected boolean isDirectory(org.apache.sshd.sftp.client.SftpClient.DirEntry file)
      Description copied from class: AbstractDirectoryAwareFileListFilter
      Subclasses must implement this method to indicate whether the file is a directory or not.
      Specified by:
      isDirectory in class AbstractDirectoryAwareFileListFilter<org.apache.sshd.sftp.client.SftpClient.DirEntry>
      Parameters:
      file - the file.
      Returns:
      true if it's a directory.