We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8b29d4 commit 48ad7edCopy full SHA for 48ad7ed
arduino-core/src/processing/app/helpers/FileUtils.java
@@ -83,7 +83,12 @@ public static void recursiveDelete(File file) {
83
}
84
85
public static File createTempFolder() throws IOException {
86
- File tmpFolder = new File(System.getProperty("java.io.tmpdir"), "arduino_" + new Random().nextInt(1000000));
+ return createTempFolderIn(new File(System.getProperty("java.io.tmpdir")));
87
+ }
88
+
89
+ public static File createTempFolderIn(File parent) throws IOException {
90
+ File tmpFolder = new File(parent, "arduino_"
91
+ + new Random().nextInt(1000000));
92
if (!tmpFolder.mkdir()) {
93
throw new IOException("Unable to create temp folder " + tmpFolder);
94
0 commit comments