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