Package nl.knaw.dans.bagit.verify
Class CheckIfFileExistsTask
java.lang.Object
nl.knaw.dans.bagit.verify.CheckIfFileExistsTask
- All Implemented Interfaces:
Runnable
A simple task to check if a file exists on the filesystem. This is thread safe, so many can be called at once.
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Path
private final CountDownLatch
private static final org.slf4j.Logger
private static final ResourceBundle
-
Constructor Summary
ConstructorDescriptionCheckIfFileExistsTask
(Path file, Set<Path> missingFiles, CountDownLatch latch) -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
if a file is parially normalized or of a different normalization then the manifest specifies it will fail the existence test.void
run()
-
Field Details
-
logger
private static final org.slf4j.Logger logger -
messages
-
file
-
missingFiles
-
latch
-
-
Constructor Details
-
CheckIfFileExistsTask
-
-
Method Details
-
run
public void run() -
existsNormalized
private boolean existsNormalized()if a file is parially normalized or of a different normalization then the manifest specifies it will fail the existence test. This method checks for that by normalizing what is on disk with the normalized filename and see if they match.- Returns:
- true if the normalized filename matches one on disk in the specified folder
-