IPWorks Cloud 2020 C++ Edition

Questions / Feedback?

Delimiter Property

The delimiter string to use when listing files.

Syntax

ANSI (Cross Platform)
char* GetDelimiter();
int SetDelimiter(const char* lpszDelimiter); Unicode (Windows) LPWSTR GetDelimiter();
INT SetDelimiter(LPCWSTR lpszDelimiter);
@property (nonatomic,readwrite,assign,getter=delimiter,setter=setDelimiter:) NSString* delimiter;
- (NSString*)delimiter;
- (void)setDelimiter:(NSString*)newDelimiter;
#define PID_BACKBLAZEB2_DELIMITER 25

IPWORKSCLOUD_EXTERNAL void* IPWORKSCLOUD_CALL IPWorksCloud_BackblazeB2_Get(void *lpObj, int propid, int arridx, int *lpcbVal, int64 *lpllVal);
IPWORKSCLOUD_EXTERNAL int IPWORKSCLOUD_CALL IPWorksCloud_BackblazeB2_Set(void *lpObj, int propid, int arridx, const void *val, int cbVal);

Default Value

""

Remarks

If this property is non-empty when ListFiles or ListFileVersions is called, any items whose names contain the same string between the specified Prefix and the first occurrence of the specified delimiter that follow will be rolled up into a virtual "folder" element, which is returned in place of the individual files themselves.

If a particular item is a "folder" instead of an actual file or file version, then the FileKind property will be set to folder. The same is also true of the FileList event's Kind parameter.

File Hierarchy Traversal

By using the Delimiter and Prefix properties in tandem, applications can effectively "traverse" a virtual hierarchy of files (or file versions) as if it were a filesystem. For example, assume that files with the following names exist within a bucket:

  • MyCompany
  • MyCompany/Department1
  • MyCompany/Department2
  • MyCompany/Department2/EmployeeA
  • MyCompany/Department2/EmployeeB

With Delimiter set to /, we can set Prefix to successively "deeper" values before calling ListFiles or ListFileVersions for the following effect:

Prefix Value Files Returned Folders Returned
(empty) 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

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks Cloud 2020 C++ Edition - Version 20.0 [Build 8265]