Class FileAlterationObserver.Builder
java.lang.Object
org.apache.commons.io.build.AbstractSupplier<FileAlterationObserver, FileAlterationObserver.Builder>
org.apache.commons.io.build.AbstractOriginSupplier<FileAlterationObserver, FileAlterationObserver.Builder>
org.apache.commons.io.monitor.FileAlterationObserver.Builder
- All Implemented Interfaces:
IOSupplier<FileAlterationObserver>
- Enclosing class:
FileAlterationObserver
public static final class FileAlterationObserver.Builder
extends AbstractOriginSupplier<FileAlterationObserver, FileAlterationObserver.Builder>
Builds instances of
FileAlterationObserver.- Since:
- 2.18.0
-
Method Summary
Modifier and TypeMethodDescriptionget()Gets a newFileAlterationObserverinstance.setFileFilter(FileFilter fileFilter) Sets the file filter or null if none.Sets what case sensitivity to use comparing file names, null means system sensitive.setRootEntry(FileEntry rootEntry) Sets the root directory to observe.Methods inherited from class AbstractOriginSupplier
checkOrigin, getOrigin, hasOrigin, newByteArrayOrigin, newChannelOrigin, newCharSequenceOrigin, newFileOrigin, newFileOrigin, newInputStreamOrigin, newOutputStreamOrigin, newPathOrigin, newPathOrigin, newRandomAccessFileOrigin, newRandomAccessFileOrigin, newReaderOrigin, newURIOrigin, newWriterOrigin, setByteArray, setChannel, setCharSequence, setFile, setFile, setInputStream, setOrigin, setOutputStream, setPath, setPath, setRandomAccessFile, setRandomAccessFile, setReader, setURI, setWriterMethods inherited from class AbstractSupplier
asThisMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IOSupplier
asSupplier, getUnchecked
-
Method Details
-
get
Gets a newFileAlterationObserverinstance.- Returns:
- a result.
- Throws:
IOException- if an I/O error occurs converting to anFileusingAbstractOrigin.getFile().- See Also:
-
setFileFilter
Sets the file filter or null if none.- Parameters:
fileFilter- file filter or null if none.- Returns:
- This instance.
-
setIOCase
Sets what case sensitivity to use comparing file names, null means system sensitive.- Parameters:
ioCase- what case sensitivity to use comparing file names, null means system sensitive.- Returns:
- This instance.
-
setRootEntry
Sets the root directory to observe.- Parameters:
rootEntry- the root directory to observe.- Returns:
- This instance.
-