ObjectPrefix Property
A prefix used to restrict the results returned when listing objects.
Syntax
ANSI (Cross Platform) char* GetObjectPrefix();
int SetObjectPrefix(const char* lpszObjectPrefix); Unicode (Windows) LPWSTR GetObjectPrefix();
INT SetObjectPrefix(LPCWSTR lpszObjectPrefix);
@property (nonatomic,readwrite,assign,getter=objectPrefix,setter=setObjectPrefix:) NSString* objectPrefix; - (NSString*)objectPrefix; - (void)setObjectPrefix:(NSString*)newObjectPrefix;
#define PID_IBMSTORAGE_OBJECTPREFIX 29 IPWORKSCLOUD_EXTERNAL void* IPWORKSCLOUD_CALL IPWorksCloud_IBMStorage_Get(void *lpObj, int propid, int arridx, int *lpcbVal, int64 *lpllVal); IPWORKSCLOUD_EXTERNAL int IPWORKSCLOUD_CALL IPWorksCloud_IBMStorage_Set(void *lpObj, int propid, int arridx, const void *val, int cbVal);
Default Value
""
Remarks
This property, if non-empty, is used to restrict the results returned by ListObjects (or ListVersions) to only the objects (or object versions) whose names begin with the given value.
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:
- MyCompany/
- MyCompany/Department1/
- MyCompany/Department2/
- MyCompany/Department2/EmployeeA
- MyCompany/Department2/EmployeeB
With ObjectDelimiter set to /, we can set ObjectPrefix to successively "deeper" values before calling ListObjects or ListVersions for the following effect:
ObjectPrefix Value | ObjectDelimiter Value | Objects Returned | Prefixes Returned |
(empty) | / | (none) | MyCompany/ |
MyCompany/ | / | MyCompany/ | MyCompany/Department1/ MyCompany/Department2/ |
MyCompany/Department2/ | / | MyCompany/Department2/ MyCompany/Department2/EmployeeA MyCompany/Department2/EmployeeB | (none) |
This property is not available at design time.
Data Type
String