To provide additional capabilities to file search, CBFS Storage query language was introduced. It allows user to select files by their metadata (file tags).
Search queries are UNICODE strings constructed of language elements and conatants.
When parsing the query, CBFS Storage converts all its operands to the same data type. Type conversion rules are described in the section: Type conversion in CBFS Storage query language.
Specify tag names and data types using AddTagName method.
Use SetFileTagAs* (where * denotes tag data type) functions to set values of file tags.
Use GetFileTagAs* (where * denotes tag data type) functions to retrieve file tag values.
Note, that string tags may contain ANSI string values, while CBFS Storage query language operates with UNICODE strings only. It is recommended to use only ASCII characters for ANSI string tags.
To find a first match to the query, call FindByQueryFirst method with a corresponding Query parameter. To find other files matching the query, use FindByQueryNext function. Don't forget to release allocated resources by calling FindByQueryClose.