class DirectoryStoreFile implements StoreLoader {

    @Override
    public void load(final Path directory) throws IOException {

        //this method covers both non-directories and non-existent files
        if (!Files.isDirectory(directory)) {
            throw new IllegalArgumentException(directory.toString() + " doesn't exist or is not a directory");
        }

        this.fileListIterator = Files.list(directory).iterator();
    }

}