Java Utililty Methods Temp Directory Create

List of utility methods to do Temp Directory Create

Description

The list of methods to do Temp Directory Create are organized into topic(s).

Method

FilemakeTemporaryDirectory(File baseDir, String prefix)
Creates a randomly-named temporary directory.
if (baseDir == null) {
    baseDir = new File(System.getProperty("java.io.tmpdir"));
baseDir.mkdirs();
for (int tries = 0; tries < 3; ++tries) {
    File result = File.createTempFile(prefix, null, baseDir);
    if (!result.delete()) {
        throw new IOException("Couldn't delete temporary file " + result.getAbsolutePath()
...
voidmakeTemporaryDirectory(String dir)
make Temporary Directory
new File(dir).mkdirs();