I would like to know if it is possible in Java to use wildcard to list all existing files according to a pattern path
For example, if i use this pattern path
s3://dataai/alarms/Json/mydata/[0-9]*/[0-9]*/[0-9]*/*_01.json
it should return all these files for example:
s3://dataai/alarms/Json/mydata/9901/2021/10/1243332_01.json
s3://dataai/alarms/Json/mydata/9912/2021/10/1245432_01.json
s3://dataai/alarms/Json/mydata/9912/2021/09/7665432_01.json
...
Any idea?
CodePudding user response:
Amazon S3 does not support such wildcards when listing objects.
Your code would need to return all objects with that Prefix. Your code should then perform the wildcard check against the list of returned Keys.