@Override
    public Path findPathInPublic(String finalUri) {
        List<String> uris = asList(finalUri, finalUri.replaceFirst("/", "")).stream().collect(Collectors.toList());
        Path result = null;
        for (String uri : uris) {
            Path configPath = controller.getConfigPath().resolve("public");
            Path resolve = configPath.resolve(uri);
            if (Files.exists(resolve)) {
                result = resolve;
                break;
            }
        }
        return result;
    }
Resolve a file to a valid base browsing directory
@param referenceFile The base directory or a child file that should be used as a browsing base path
@return A valid directory's File object
src/main/java/com/kodedu/service/impl/DirectoryServiceImpl.java