Lists the object versions in a bucket.
ANSI (Cross Platform) int ListVersions(); Unicode (Windows) INT ListVersions();
#define MID_S3CLIENT_LISTVERSIONS 24 IPWORKSS3_EXTERNAL int IPWORKSS3_CALL IPWorksS3_S3Client_Do(void *lpObj, int methid, int cparam, void *param, int cbparam, int64 *lpllVal);
This method lists the object versions in the bucket currently selected by Bucket.
Before calling this method, the ObjectPrefix property may be set in order to restrict the results to only the object versions whose names begin with a given string. The ObjectDelimiter property can also be used to further tune the results returned. The MaxObjects configuration setting may be used to limit the number of results returned.
Calling this method will fire the ObjectList event once for each object version, and will also populate the Objects* properties. It may also fire the PrefixList event, and populate the PrefixCount and Prefix[i] configuration settings, depending on how the properties discussed above are set.
If there are still more object versions available to list when this method returns, the VersionMarker property will be populated. Continue to call this method until VersionMarker is empty to accumulate all pages of results in the Objects* properties.
Object Hierarchy Traversal
By using the ObjectDelimiter and ObjectPrefix properties in tandem, applications can effectively "traverse" a virtual hierarchy of objects (or object versions) as if it were a filesystem. For example, assume that objects with the following names exist within a bucket:
|ObjectPrefix Value||ObjectDelimiter Value||Objects Returned||Prefixes Returned|
Error Handling (C++)
This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)