Class FileValidator
Object
FileValidator
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Ensures thatpath
exists, is a regular file and is readable.static void
Ensures that the parent directory ofpath
exists and that the file can be created or overwritten.
-
Method Details
-
ensureReadable
Ensures thatpath
exists, is a regular file and is readable.- Parameters:
path
- path to validatelabel
- descriptive label used in the failure messagectx
- immutable context propagated to the SDK exception- Throws:
AnkaSecureSdkException
- if any pre-condition is not met
-
ensureWritable
Ensures that the parent directory ofpath
exists and that the file can be created or overwritten.- Parameters:
path
- target filelabel
- descriptive label used in the failure messagectx
- immutable context propagated to the SDK exception- Throws:
AnkaSecureSdkException
- if the file cannot be created/written
-