@Override
    public FileReference addFile(String relativePath) {
        File file = appPath.resolve(relativePath).toFile();
        Path relative = appPath.relativize(file.toPath()).normalize();
        if (relative.isAbsolute() || relative.startsWith(".."))
            throw new IllegalArgumentException(file + " is not a descendant of " + appPath);

        if (!file.exists()) {
            throw new RuntimeException("The file does not exist: " + file.getPath());
        }

        FileReference fileReference = new FileReference("LocalFileDb:" + relativePath);
        fileReferenceToFile.put(fileReference, file);
        return fileReference;
    }
FileAcquirer and FileRegistry working on a local directory.

@author Tony Vaagenes
@author ollivir
standalone-container/src/main/java/com/yahoo/container/standalone/LocalFileDb.java