Question : java create directory if not exists
Answered by : no-name-pro
String path = ...
File pathAsFile = new File(path);
if (!Files.exists(Paths.get(path))) { pathAsFile.mkdir();
}
Source : | Last Update : Mon, 04 May 20
Question : java create folder if not exists
Answered by : yucky-yacare-9wou1gzw2fr7
Files.createDirectories(Paths.get("/Your/Path/Here"));
Source : https://stackoverflow.com/questions/28947250/create-a-directory-if-it-does-not-exist-and-then-create-the-files-in-that-direct | Last Update : Tue, 12 Sep 23