Methods on File Object is undeclared
<p>When I wrote this method it gave me an error that the method exists() and canRead() is undeclared in the File Object:
// TODO: Remove or fix this.</p>

<pre><code>public static Pixa readFiles(File dir, String prefix) {
        if (dir == null)
            throw new IllegalArgumentException("Directory must be non-null");
        if (!dir.exists())
            throw new IllegalArgumentException("Directory does not exist");
        if (!dir.canRead())
            throw new IllegalArgumentException("Cannot read directory");


        throw new RuntimeException("readFiles() is not current supported");
    }
</code></pre>

<p>can anyone fix this error ? </p>
