title: Common IO - listFilesAndDirs only shows files
body: <p>I'm trying to use <code>FileUtils.listFilesAndDirs</code> to show all the files and folders in a given path but currently my code only gets the files and filters out the directories in the given path.</p>
  
  <pre><code>    //Ask for the path to the directory
      System.out.println("Enter path: ");
      path = scanner.nextLine();
      File myFile = new File(path);   
  
      if(myFile == null || !myFile.exists()) {
          System.out.println("Bad directory path!");
          System.exit(-1);
      }
  
      //Make a filter that matches files and directories
      final IOFileFilter myFilter = new IOFileFilter() {  
          @Override
          public boolean accept(File dir, String name) {
              return true;
          }
  
          @Override
          public boolean accept(File file) {
              return true;
  
          }
      };
  
      //List files and folders in that directory
      Collection&lt;File&gt; listOfFiles = FileUtils.listFilesAndDirs(myFile, myFilter, null);
  
      for(File file : listOfFiles) {
          if(file.isDirectory()) {
              System.out.print("Directory: ");
          }
          else { 
              System.out.println("File: ");
          }
  
          System.out.print(file.getAbsolutePath());       
      }
  </code></pre>