title: Readings files from a directory
body: <p>I need to read each file from a directory to parse them individualy when I give a directory structure.</p>
  
  <p>I check if it excists and if its valid .. etc and I can parse the file's individualy.  But I have no idea how to do it :</p>
  
  <p>I had a idea but it doesn't work :</p>
  
  <pre><code>String dir = userinput;
  File directory = new File(dir);
  File files[] = directory.listFiles();
  
  for (File f : files){
      // parsing method    
  }
  </code></pre>
  
  <p>I have a method that checks if it's a valid dir or file and I always get a return that the file isn't valid.  If I read them individualy I have no problems</p>