java проверить, существует ли каталог
Path path = ...;
if (Files.exists(path)) {
// ...
}
No Name Pro
Path path = ...;
if (Files.exists(path)) {
// ...
}
private final File pathToUploads = new File("path/to/folder");
if (pathToUploads.exists() && pathToUploads.isDirectory()) {
//do what you want
}