Java Files create temporary directory

Description

Java Files create temporary directory

import java.nio.file.Files;
import java.nio.file.Path;

public class Main {
  public static void main(String[] args) {
    try {/*from w  ww .j a va2 s. co  m*/
      Path tDir = Files.createTempDirectory("temp");
      System.out.println("Temp directory: " + tDir);

    } catch (Exception e) {
      e.printStackTrace();
    }
  }
}



PreviousNext

Related