Class FSQueueUtil
java.lang.Object
com.norconex.committer.core.batch.queue.impl.FSQueueUtil
File sytem queue utility methods.
-
Method Summary
Modifier and TypeMethodDescriptionfindZipFiles(Path dir) Finds all files with the ".zip" extension from within a given directory, recursively.static CommitterRequestfromZipFile(Path sourceFile) static CommitterRequestfromZipFile(Path sourceFile, CachedStreamFactory streamFactory) static booleanRecursively gets whether a queue directory is empty of queue files.static voidtoZipFile(CommitterRequest request, Path targetFile)
-
Method Details
-
isEmpty
Recursively gets whether a queue directory is empty of queue files.- Parameters:
dir- directory to start looking- Returns:
trueif empty- Throws:
IOException- if an I/O error occurs
-
findZipFiles
Finds all files with the ".zip" extension from within a given directory, recursively.- Parameters:
dir- directory to start looking- Returns:
- a stream of Zip files.
- Throws:
IOException- problem occurred searching for files.
-
toZipFile
- Throws:
IOException
-
fromZipFile
- Throws:
IOException
-
fromZipFile
public static CommitterRequest fromZipFile(Path sourceFile, CachedStreamFactory streamFactory) throws IOException - Throws:
IOException
-