java create directory if not exists
String path = ...
File pathAsFile = new File(path);
if (!Files.exists(Paths.get(path))) {
pathAsFile.mkdir();
}
Are there any code examples left?
New code examples in category Java
String path = ...
File pathAsFile = new File(path);
if (!Files.exists(Paths.get(path))) {
pathAsFile.mkdir();
}