java - Amazon S3 - List ALL objects without hierarchy summaries -
for it's worth, amazon s3 library being used perform operations on hcp. perhaps limits version of amazon s3 can use or changes interpretation of folder. understanding is, both amazon s3 , hcp can acknowledge full paths objects , ignore folders, i'm having difficulty getting requests that.
say have:
- something/over/here/object1
- something/over/there/object2
- somewhere/far/object3
and want every object under something/. here request attempt:
listobjectsrequest listsomeobjects= new listobjectsrequest() .withbucketname("bucket") .withdelimiter("/") .withprefix("something/") .withmaxkeys("100") // maybe not necessary since stops @ 1000 .withmarker(null); // used after first request, imagine objectlisting objectsreturned = this.hs3client.listobjects(listsomeobjects);
objectsreturned gives me few options:
- getcommonprefixes() - if include delimiter, returns something/over. otherwise, appears empty.
- getobjectsummaries() - delimiter, returns objects under something/ , itself. in case, has itself. without delimiter, returns list of object summaries something/, something/over/, something/over/here, something/over/there/, something/over/here/object1, something/over/there/object2.
- getbucketname(), getmarker(), getmaxkeys(), getdelimiter(), getnextmarker(), getprefix() - these don't appear need
i need list of full object names: something/over/here/object1, something/over/there/object2
looping through of getobjectsummaries() filter results last resort. using incredible amount of small requests account subfolders may not viable our use case. there way list of full object names common prefix without going through keys in getobjectsummaries()?
which amazon library version using?
i can tell i've been using
amazons3.listobjects(string bucketname, string prefix)
and received list of existing matching keys. actual objects, not "virtual folder" subpaths (using getobjectsummaries method do)
as far know equivalent code without delimiter (keeping aside maxkeys).
i used version 1.10.52 in case matters (would surprised).
Comments
Post a Comment