MCPcopy
hub / github.com/arduino/Arduino / getBuildPath

Method getBuildPath

arduino-core/src/processing/app/Sketch.java:179–191  ·  view source on GitHub ↗

Gets the build path for this sketch. The first time this is called, a build path is generated and created and the same path is returned on all subsequent calls. This takes into account the build.path preference. If it is set, that path is always returned, and the directory is not deleted on shutdow

()

Source from the content-addressed store, hash-verified

177 * shutdown.
178 */
179 public File getBuildPath() throws IOException {
180 if (buildPath == null) {
181 if (PreferencesData.get("build.path") != null) {
182 buildPath = BaseNoGui.absoluteFile(PreferencesData.get("build.path"));
183 Files.createDirectories(buildPath.toPath());
184 } else {
185 buildPath = FileUtils.createTempFolder("arduino_build_");
186 DeleteFilesOnShutdown.add(buildPath);
187 }
188 }
189
190 return buildPath;
191 }
192
193 protected void removeFile(SketchFile which) {
194 if (!files.remove(which))

Callers 3

uploadMethod · 0.80
buildMethod · 0.80
handleDeleteCodeMethod · 0.80

Calls 4

getMethod · 0.95
absoluteFileMethod · 0.95
createTempFolderMethod · 0.95
addMethod · 0.95

Tested by

no test coverage detected