class PDSPathExecutableValidator {

    public String createValidationErrorMessage(String path) {
        if (path == null || path.trim().isEmpty()) {
            return "no path set!";
        }
        Path p = Paths.get(path);
        if (Files.notExists(p)) {
            return "file does not exist:"+path;
        }
        if (! Files.isExecutable(p)) {
            return "file exists, but not executable:"+path;
        }
        
        return null;
    }

}