private void validatePermissions ( final File dirPath , final File file ) { // Check execute and read permissions for parent dirPath if ( ! dirPath . canExecute ( ) || ! dirPath . canRead ( ) ) { validFilePermissions = false ; filePermissionsProblemPath = dirPath . getAbsolutePath ( ) ; return ; } // Check read and write permissions for properties file if ( ! file . canRead ( ) || ! file . canWrite ( ) ) { validFilePermissions = false ; filePermissionsProblemPath = dirPath . getAbsolutePath ( ) ; } }
This method performs a series of permissions checks given a directory and properties file path .