Code example for URI

Methods: getPath

0
        } 
    } 
 
    void forEach(String extension, IFileHandler fileHandler) {
        Stack<File> dirs = new Stack<File>();
        dirs.push(new File(path.getPath()));
        forEach(extension, fileHandler, dirs);
    } 
     
    private void forEach(final String extension, IFileHandler fileHandler, Stack<File> dirs) {
        do { 
            File dir = dirs.pop();
            for (File file : dir.listFiles()) {
                if (file.isDirectory()) {
                    dirs.push(file);
                } else { 
                    if (file.getName().endsWith("." + extension)) {
                        fileHandler.handle(file);                        
                    } 
                } 
Contextual code suggestions in your IDE  Get Codota for Java