Package net.sourceforge.jnlp.config
Class DirectoryValidator
java.lang.Object
net.sourceforge.jnlp.config.DirectoryValidator
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classIs storing result of directory validation.static classThis class is holding results of directory validation. -
Constructor Summary
ConstructorsConstructorDescriptionCreates DirectoryValidator to ensure directories read from user (if any - default otherwise) settings via keys:DeploymentConfiguration.KEY_USER_CACHE_DIRDeploymentConfiguration.KEY_USER_PERSISTENCE_CACHE_DIRDeploymentConfiguration.KEY_SYSTEM_CACHE_DIRDeploymentConfiguration.KEY_USER_LOG_DIRDeploymentConfiguration.KEY_USER_TMP_DIRDeploymentConfiguration.KEY_USER_LOCKS_DIRDirectoryValidator(List<File> dirsToCheck) Creates DirectoryValidator to ensure given directories -
Method Summary
Modifier and TypeMethodDescriptionThis method is ensuring, that specified directories will exists after call and will have enough permissions.
-
Constructor Details
-
DirectoryValidator
Creates DirectoryValidator to ensure given directories- Parameters:
dirsToCheck- dirs to check
-
DirectoryValidator
public DirectoryValidator()Creates DirectoryValidator to ensure directories read from user (if any - default otherwise) settings via keys:
-
-
Method Details
-
ensureDirs
This method is ensuring, that specified directories will exists after call and will have enough permissions.This methods is trying to create the directories if they are not present and is testing if can be written inside. All checks are done in bulk. If one or more defect is found, user is warned via dialogue in gui mode (again in bulk). In headless mode stdout/stderr is enough, as application (both gui and headless) should not stop to work, but continue to run with hope that corrupted dirs will not be necessary
- Returns:
- result of directory checks
-