@PublicEvolving public abstract class FilePathFilter extends Object implements Serializable
ContinuousFileMonitoringFunction
.
The filterPath(Path)
method is responsible for deciding if a path is eligible for further
processing or not. This can serve to exclude temporary or partial files that
are still being written.Modifier and Type | Class and Description |
---|---|
static class |
FilePathFilter.DefaultFilter
The default file path filtering method and is used
if no other such function is provided.
|
Constructor and Description |
---|
FilePathFilter() |
Modifier and Type | Method and Description |
---|---|
static FilePathFilter |
createDefaultFilter() |
abstract boolean |
filterPath(Path filePath)
Returns
true if the filePath given is to be
ignored when processing a directory, e.g. |
public static FilePathFilter createDefaultFilter()
public abstract boolean filterPath(Path filePath)
true
if the filePath
given is to be
ignored when processing a directory, e.g.
public boolean filterPaths(Path filePath) {
return filePath.getName().startsWith(".") || filePath.getName().contains("_COPYING_");
}
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.