Class FileNameVirtualFileFilter

  • All Implemented Interfaces:
    VirtualFileFilter

    public class FileNameVirtualFileFilter
    extends java.lang.Object
    implements VirtualFileFilter
    Exclude virtual file by file name and path.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Map<java.lang.String,​java.util.Set<java.lang.String>> excludes  
    • Constructor Summary

      Constructors 
      Constructor Description
      FileNameVirtualFileFilter​(java.util.Map<java.lang.String,​java.util.Set<java.lang.String>> excludes)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean accepts​(VirtualFile file)
      Do we accept file.
      protected java.lang.String getPathName​(VirtualFile file)
      Get the path name for the VirtualFile.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • excludes

        private java.util.Map<java.lang.String,​java.util.Set<java.lang.String>> excludes
    • Constructor Detail

      • FileNameVirtualFileFilter

        public FileNameVirtualFileFilter​(java.util.Map<java.lang.String,​java.util.Set<java.lang.String>> excludes)
    • Method Detail

      • accepts

        public boolean accepts​(VirtualFile file)
        Do we accept file.

        If pathName contains any of the keys, * if the value is null - then do exclude * if value is not null - only exclude if it value contains simple name

        Specified by:
        accepts in interface VirtualFileFilter
        Parameters:
        file - the virtual file
        Returns:
        false if file is excluded by excludes map, true other wise
      • getPathName

        protected java.lang.String getPathName​(VirtualFile file)
        Get the path name for the VirtualFile.
        Parameters:
        file - the virtual file
        Returns:
        the path name