Answers for "how to check if path is directory java"

2

java check if directory exists

Path path = ...;

if (Files.exists(path)) {
    // ...
}
Posted by: Guest on April-27-2020
0

java check if path exists

private final File pathToUploads = new File("path/to/folder");
if (pathToUploads.exists() && pathToUploads.isDirectory()) {
 	//do what you want 
}
Posted by: Guest on April-06-2022

Code answers related to "how to check if path is directory java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language