    @Override
         public boolean accept(Path path){
           boolean isFileAcceptable = true;
           try{
                 if(fileSystem.isDirectory(path)){
                       return true;
                 }
 
                 if(filePattern != null){
                     Matcher m = filePattern.matcher(path.toString());
                     isFileAcceptable = m.matches();
                 }
 
                 if(filterSize > 0){
                     long actualFileSize = fileSystem.getFileStatus(path).getLen();
                     if(actualFileSize > this.filterSize){
                         isFileAcceptable &= true;
                     }
                     else{
                         isFileAcceptable = false;
                     }
                 }
 
             }
             catch(IOException ioException){
                 //Error handling goes here.
 
             }
 
             return isFileAcceptable;
         }
 
 
