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

Method createTempFolder

app/src/processing/app/Util.java:216–228  ·  view source on GitHub ↗

Create a temporary folder by using the createTempFile() mechanism, deleting the file it creates, and making a folder using the location that was provided. Unlike createTempFile(), there is no minimum size for prefix. If prefix is less than 3 characters, the remaining characters will be filled with

(String prefix, String suffix,
                                      File directory)

Source from the content-addressed store, hash-verified

214 * filled with underscores
215 */
216 static public File createTempFolder(String prefix, String suffix,
217 File directory) throws IOException {
218 int fillChars = 3 - prefix.length();
219 for (int i = 0; i < fillChars; i++) {
220 prefix += '_';
221 }
222 File folder = File.createTempFile(prefix, suffix, directory);
223 // Now delete that file and create a folder in its place
224 folder.delete();
225 folder.mkdirs();
226 // And send the folder back to your friends
227 return folder;
228 }
229
230
231 /**

Callers 3

createAndShowGUIMethod · 0.95
makeTempFolderMethod · 0.95
createTempFolderMethod · 0.95

Calls 2

createTempFileMethod · 0.80
deleteMethod · 0.80

Tested by

no test coverage detected