public abstract class AbstractFileFilter extends java.lang.Object implements IOFileFilter, PathVisitor
FileFilter (IO), FilenameFilter (IO), PathFilter (NIO)
interfaces via our own IOFileFilter interface.
Note that a subclass MUST override one of the accept methods, otherwise that subclass will infinitely loop.
EMPTY_STRING_ARRAY| Constructor and Description |
|---|
AbstractFileFilter()
Constructs a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(java.io.File file)
Checks to see if the File should be accepted by this filter.
|
boolean |
accept(java.io.File dir,
java.lang.String name)
Checks to see if the File should be accepted by this filter.
|
java.nio.file.FileVisitResult |
postVisitDirectory(java.nio.file.Path dir,
java.io.IOException exc) |
java.nio.file.FileVisitResult |
preVisitDirectory(java.nio.file.Path dir,
java.nio.file.attribute.BasicFileAttributes attributes) |
java.lang.String |
toString()
Provides a String representation of this file filter.
|
java.nio.file.FileVisitResult |
visitFile(java.nio.file.Path file,
java.nio.file.attribute.BasicFileAttributes attributes) |
java.nio.file.FileVisitResult |
visitFileFailed(java.nio.file.Path file,
java.io.IOException exc) |
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitaccept, and, negate, orpublic boolean accept(java.io.File file)
accept in interface java.io.FileFilteraccept in interface IOFileFilterfile - the File to checkpublic boolean accept(java.io.File dir,
java.lang.String name)
accept in interface java.io.FilenameFilteraccept in interface IOFileFilterdir - the directory File to checkname - the file name within the directory to checkpublic java.nio.file.FileVisitResult postVisitDirectory(java.nio.file.Path dir,
java.io.IOException exc)
throws java.io.IOException
postVisitDirectory in interface java.nio.file.FileVisitor<java.nio.file.Path>java.io.IOExceptionpublic java.nio.file.FileVisitResult preVisitDirectory(java.nio.file.Path dir,
java.nio.file.attribute.BasicFileAttributes attributes)
throws java.io.IOException
preVisitDirectory in interface java.nio.file.FileVisitor<java.nio.file.Path>java.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.nio.file.FileVisitResult visitFile(java.nio.file.Path file,
java.nio.file.attribute.BasicFileAttributes attributes)
throws java.io.IOException
visitFile in interface java.nio.file.FileVisitor<java.nio.file.Path>java.io.IOExceptionpublic java.nio.file.FileVisitResult visitFileFailed(java.nio.file.Path file,
java.io.IOException exc)
throws java.io.IOException
visitFileFailed in interface java.nio.file.FileVisitor<java.nio.file.Path>java.io.IOExceptionCopyright © 2010 - 2023 Adobe. All Rights Reserved