MCPcopy Index your code
hub / github.com/benfry/processing4 / getDefaultSketchbookFolder

Method getDefaultSketchbookFolder

app/src/processing/app/Base.java:2336–2360  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2334
2335
2336 static protected File getDefaultSketchbookFolder() {
2337 File sketchbookFolder = null;
2338 try {
2339 sketchbookFolder = Platform.getDefaultSketchbookFolder();
2340 } catch (Exception ignored) { }
2341
2342 if (sketchbookFolder == null) {
2343 Messages.showError("No sketchbook",
2344 "Problem while trying to get the sketchbook", null);
2345
2346 } else {
2347 // create the folder if it doesn't exist already
2348 boolean result = true;
2349 if (!sketchbookFolder.exists()) {
2350 result = sketchbookFolder.mkdirs();
2351 }
2352
2353 if (!result) {
2354 Messages.showError("You forgot your sketchbook",
2355 "Processing cannot run because it could not\n" +
2356 "create a folder to store your sketchbook.", null);
2357 }
2358 }
2359 return sketchbookFolder;
2360 }
2361}

Callers 1

Calls 2

showErrorMethod · 0.95

Tested by

no test coverage detected