/** * Verify that the given directory is not present * * @param clusterDirectory actual directory to look for * @throws IOException trouble with FS * @throws SliderException If the directory exists */ public void verifyDirectoryNonexistent(Path clusterDirectory) throws IOException, SliderException { if (fileSystem.exists(clusterDirectory)) { log.error("Dir {} exists: {}", clusterDirectory, listFSDir(clusterDirectory)); throw new SliderException(SliderExitCodes.EXIT_INSTANCE_EXISTS, ErrorStrings.PRINTF_E_INSTANCE_DIR_ALREADY_EXISTS, clusterDirectory); } }
/** * Verify that the given directory is not present * * @param clusterDirectory actual directory to look for * @throws IOException trouble with FS * @throws SliderException If the directory exists */ public void verifyDirectoryNonexistent(Path clusterDirectory) throws IOException, SliderException { if (fileSystem.exists(clusterDirectory)) { log.error("Dir {} exists: {}", clusterDirectory, listFSDir(clusterDirectory)); throw new SliderException(SliderExitCodes.EXIT_INSTANCE_EXISTS, ErrorStrings.PRINTF_E_INSTANCE_DIR_ALREADY_EXISTS, clusterDirectory); } }