MCPcopy Create free account
hub / github.com/ddf-project/DDF / locateOrCreateDirectory

Method locateOrCreateDirectory

core/src/main/java/io/ddf/util/Utils.java:223–233  ·  view source on GitHub ↗

Same as locateDirectory(dirName), but also creates it if it doesn't exist. @param dirName @return @throws IOException

(String dirName)

Source from the content-addressed store, hash-verified

221 * @throws IOException
222 */
223 public static String locateOrCreateDirectory(String dirName) throws IOException {
224 String path = locateDirectory(dirName);
225
226 if (path == null) {
227 File file = new File(dirName);
228 file.mkdirs();
229 path = file.getCanonicalPath();
230 }
231
232 return path;
233 }
234
235 /**
236 * @param path

Calls 1

locateDirectoryMethod · 0.95

Tested by

no test coverage detected