public class DirectoryObserver
extends java.lang.Object
Constructor and Description |
---|
DirectoryObserver(java.lang.String directoryToObserver,
java.lang.String filenamePattern)
Creates a new registration on the given directory for new files.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<java.nio.file.Path> |
getNewFiles()
This method waits until new files are created in the observed directory.
|
java.util.List<java.nio.file.Path> |
getNewFilesFromObserverWithScanningDirectory(int timeOutInSeconds)
This method waits until new files are created in the observed directory, or the passed
timeOut is reached.
|
public DirectoryObserver(java.lang.String directoryToObserver, java.lang.String filenamePattern) throws LogarchiverException
LogarchiverException
public java.util.List<java.nio.file.Path> getNewFiles() throws LogarchiverException
LogarchiverException
public java.util.List<java.nio.file.Path> getNewFilesFromObserverWithScanningDirectory(int timeOutInSeconds) throws LogarchiverException
LogarchiverException