1 답변
-
JDK7에서 File.createTempDirectory클래스로 임시 디렉토리를 만들수있습니다.
그리고 JDK7이 나오기 전에는
public static File createTempDirectory() throws IOException { final File temp; temp = File.createTempFile("temp", Long.toString(System.nanoTime())); if(!(temp.delete())) { throw new IOException("Could not delete temp file: " + temp.getAbsolutePath()); } if(!(temp.mkdir())) { throw new IOException("Could not create temp directory: " + temp.getAbsolutePath()); } return (temp); }
이런식으로 했습니다.
댓글 입력