java listfiles hanging on files with bad characters
<p>I have this code that lists all the files in a dir:</p>

<pre><code>File d = getRootDir(cId);
return d.listFiles(new FilenameFilter() {
            public boolean accept(File dir, String name) {             
                return name.endsWith(FILE_EXTENSION);
            }
}
</code></pre>

<p>It hangs because, the dir got corrupted and has a file name with invalid chars. Is there an alternate way to do this, so that i can get the list of files and not hang?</p>

<p>Thanks.</p>
