public static boolean containsVault ( Path pathToVault , String masterkeyFilename ) { Path masterKeyPath = pathToVault . resolve ( masterkeyFilename ) ; Path dataDirPath = pathToVault . resolve ( Constants . DATA_DIR_NAME ) ; return Files . isReadable ( masterKeyPath ) && Files . isDirectory ( dataDirPath ) ; }
Checks if the folder represented by the given path exists and contains a valid vault structure .