MCPcopy Index your code
hub / github.com/processing/processing / getBasePath

Method getBasePath

core/src/processing/core/PShapeOBJ.java:433–442  ·  view source on GitHub ↗
(PApplet parent, String filename)

Source from the content-addressed store, hash-verified

431
432
433 static protected String getBasePath(PApplet parent, String filename) {
434 // Obtaining the path
435 File file = new File(parent.dataPath(filename));
436 if (!file.exists()) {
437 file = parent.sketchFile(filename);
438 }
439 String absolutePath = file.getAbsolutePath();
440 return absolutePath.substring(0,
441 absolutePath.lastIndexOf(File.separator));
442 }
443
444
445 // Stores a material defined in an MTL file.

Callers 1

PShapeOBJMethod · 0.95

Calls 2

dataPathMethod · 0.80
sketchFileMethod · 0.80

Tested by

no test coverage detected