Java로 디렉토리를 작성하는 방법은 무엇입니까?
Java로 디렉토리를 작성하는 방법은 무엇입니까? 디렉토리 / 폴더를 작성하는 방법 테스트를 마치면 System.getProperty("user.home"); 새 폴더가 존재하지 않는 경우에만 디렉토리 (디렉토리 이름 "new folder")를 작성해야합니다. ~ 7 년 후, Bozho가 제안한 더 나은 접근 방식으로 업데이트하겠습니다. new File("/path/directory").mkdirs(); 더 이상 사용되지 않음 : File theDir = new File("new folder"); // if the directory does not exist, create it if (!theDir.exists()) { System.out.println("creating directory: " + the..