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