nextflow-io / nextflow-s3fs

An S3 File System Provider for Java 7 (project archived)
Apache License 2.0
1 stars 10 forks source link

[BUG] can't list sub directory files #28

Closed neildeng closed 2 years ago

neildeng commented 2 years ago

I have file structure, such as:

I want to list files in photos and I exactly expect to get the result, such as [image1.jpg, image2.jpg, 2021, 2022]

private List<String> fileList(Path start) throws IOException {
    try (Stream<Path> pathStream = Files.list(start)) {
        return pathStream
            .map(path -> path.getFileName().toString())
            .collect(Collectors.toList());
    }
}

But, I got a empty list.

After I marked request.setMarker(key); in S3Iterator.buildRequest,
I got correct result.

pditommaso commented 2 years ago

If this is a patch meant to be used by nextflow, not that this project has been embedded in the main repo https://github.com/nextflow-io/nextflow/blob/a06b444236164b88218ef548f7bf834727faa33f/plugins/nf-amazon/src/main/com/upplication/s3fs#L45-L45

neildeng commented 2 years ago

OK, copy that.