CBFS Storage 2020 Java Edition

Questions / Feedback?

File Tags

CBFS Storage allows applications to attach arbitrary metadata to any file, directory, or alternate stream using file tags. There are two kinds of file tags, both of which are stored as key-value pairs:

  1. Raw file tags use numeric Ids as keys and store raw binary data.
    • Valid Id values are those in the range 0x0001 to 0xCFFF (inclusive).
    • A tag should contain at least one (1) byte of data.
    • The maximum size of a raw file tag's binary data is 65531 bytes.
  2. Typed file tags use string keys and store typed values.
    • Names may be up to 4095 characters long (not including the null terminator), and are stored in UTF-16LE format internally.
    • The maximum size of a typed file tag's value is 65529 - (name_length * 2) bytes (where name_length is measured in characters, including the null terminator).

Each file, directory, and alternate stream can have up to 1024 typed file tags and 53247 raw file tags attached to it at once. The following methods are used to manage and interact with file tags:

Applications can also use the FindFirstByQuery method to search for files and directories whose file tags match a specified query; please refer to that method's documentation, as well as the Query Language topic, for more information. Note that the query language only works with typed file tags; it does not support raw file tags.

(Note: All API members discussed in this topic are available in both CBDrive, CBMemDrive, and CBVault, unless otherwise noted.)

Copyright (c) 2021 Callback Technologies, Inc. - All rights reserved.
CBFS Storage 2020 Java Edition - Version 20.0 [Build 8031]