자바 File 클래스의 mkdir() & mkdirs()

조회 2,920 · 댓글 0
열린기술자열린기술자작성자2016년 4월 25일
1. mkdir()

Creates the directory named by this abstract pathname.

예: new File("C:\\Directory1").mkdir();


2. mkdirs()

Creates the directory named by this abstract pathname, including any necessary but nonexistent parent directories. Note that if this operation fails it may have succeeded in creating some of the necessary parent directories.

예: new File("C:\\Directory2\\Sub2\\Sub-Sub2").mkdirs()

로그인 후 답글을 남길 수 있습니다.