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
()
| 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)) |
no test coverage detected