/** * Ensures that we have a work directory. If specified via a flag, the * directory must already exist. Otherwise, create a temp directory. */ private static File ensureWorkDir(Options options) throws IOException { File workDir = options.getWorkDir(); if (workDir == null) { workDir = Utility.makeTemporaryDirectory(null, "gwt-codeserver-"); } else { if (!workDir.isDirectory()) { throw new IOException("workspace directory doesn't exist: " + workDir); } } return workDir; } }
/** * Ensures that we have a work directory. If specified via a flag, the * directory must already exist. Otherwise, create a temp directory. */ private static File ensureWorkDir(Options options) throws IOException { File workDir = options.getWorkDir(); if (workDir == null) { workDir = Utility.makeTemporaryDirectory(null, "gwt-codeserver-"); } else { if (!workDir.isDirectory()) { throw new IOException("workspace directory doesn't exist: " + workDir); } } return workDir; } }