그래서 while 루프에서 일련의 디렉토리를 만들려고합니다. 섹션을 만드는 파일에 대한 코드는 여기에 있습니다 : 폴더 경로가 이미 존재파일이 새 디렉토리 (mkdir)를 만들고 싶지 않습니다?
File userDIR=new File("Folder1//"+VARIABLENUMBER+"//"+VARIABLENUMBER+"_Single.txt");
boolean exists = userDIR.exists();
System.out.println(userDIR);//prints correct location
if (!exists) {
System.out.println("does not exist");
userDIR.mkdir();//THIS IS NOT HAPPENING
System.out.println(userDIR.mkdir());//Prints FALSE?
}else{
System.out.println("File Found");
}
경우가 난데 ...하지만 난 하나를 만들려고하면 - 그것은 (단지 종류의 생략) 작동하지 않습니다 거짓이라고 말하면 ...?
내가 잘못하고있는 것을 해결할 수 없습니까?
의견이나 제안에 감사드립니다.
놀라운 스터프 !! mkdirs가 있다는 것을 깨닫지 못했습니다 :) 모두 감사합니다! – Rabiani