question: private static synchronized boolean checkFolderPermissions ( StringBuilder aStringBuilder , String aDirectory ) { File directory = new File ( aDirectory ) ; if ( ! directory . exists ( ) ) { directory . mkdirs ( ) ; } if ( ! directory . canRead ( ) ) { aStringBuilder . append ( "The directory [" + directory + "] is not readable. " + "Please check your permissions rights.\n" ) ; return false ; } if ( ! directory . canWrite ( ) ) { aStringBuilder . append ( "The directory [" + directory + "] is not writable. " + "Please check your permissions rights.\n" ) ; return false ; } return true ; }
target:  Checks if a directory already exists. If it does not exist it is created. If it already exists then, its permissions are ok.