All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pxb.java.nio.file.SimpleFileVisitor Maven / Gradle / Ivy

There is a newer version: 2.25.11
Show newest version
package pxb.java.nio.file;

import pxb.java.nio.file.attribute.BasicFileAttributes;

import java.io.IOException;

public class SimpleFileVisitor implements FileVisitor {
    @Override
    public FileVisitResult preVisitDirectory(T dir, BasicFileAttributes attrs)
            throws IOException {
        return FileVisitResult.CONTINUE;
    }

    @Override
    public FileVisitResult visitFile(T file, BasicFileAttributes attrs)
            throws IOException {
        return FileVisitResult.CONTINUE;
    }

    @Override
    public FileVisitResult visitFileFailed(T file, IOException exc)
            throws IOException {
        throw exc;
    }

    @Override
    public FileVisitResult postVisitDirectory(T dir, IOException exc)
            throws IOException {
        if (exc != null)
            throw exc;
        return FileVisitResult.CONTINUE;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy