Ref: check whether a file or directory
First, make sure the path exists by using:
new File(path).exists();
Then check whether it a directory using:
new File(path).isDirectory();
Similary,check whether it a file by using:
new File(path).isFile();
2023-08-12 12:39:40
Ref: check whether a file or directory
First, make sure the path exists by using:
new File(path).exists();
Then check whether it a directory using:
new File(path).isDirectory();
Similary,check whether it a file by using:
new File(path).isFile();