public static Set<String> getFileReferencesOnDisk(File directory) {
        Set<String> fileReferencesOnDisk = new HashSet<>();
        File[] filesOnDisk = directory.listFiles();
        if (filesOnDisk != null)
            fileReferencesOnDisk.addAll(Arrays.stream(filesOnDisk).map(File::getName).collect(Collectors.toSet()));
        return fileReferencesOnDisk;
    }
Returns all files in the given directory, non-recursive.
configserver/src/main/java/com/yahoo/vespa/config/server/filedistribution/FileDistributionUtil.java