how to check if a path to folder exists in java code example Example: java check if directory exists Path path = ...; if (Files.exists(path)) { // ... }