Java Temp Directory Create createTempDirectory()

Here you can find the source of createTempDirectory()

Description

create Temp Directory

License

Apache License

Declaration

public static File createTempDirectory() 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import com.google.common.base.Throwables;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;

public class Main {
    public static File createTempDirectory() {
        try {// ww w.  j  a  va2 s .  c o m
            final File directory = Files.createTempDirectory("sqs").toFile();
            directory.deleteOnExit(); // not sure if this works
            return directory;
        } catch (IOException e) {
            throw Throwables.propagate(e);
        }
    }
}

Related

  1. createTempDir(final String prefix)
  2. createTempDir(String prefix)
  3. createTempDir(String subdirectory)
  4. createTempDir(String suffix)
  5. createTempDirectory()
  6. createTempDirectory()
  7. createTempDirectory(File parent, String prefix)
  8. createTempDirectory(String prefix)
  9. createTempDirectory(String prefix)