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