CBVault Component
Properties Methods Events Configuration Settings Errors
The CBVault component lets applications create a vault and manipulate its contents.
Syntax
CBFSStorage.Cbvault
Remarks
The CBVault component allows applications to create a vault and interact with its contents directly. A vault can contain any number of files, directories, alternate streams, and symbolic links; so long as it has sufficient capacity to store them. For more information about using CBFS Storage's many features, please refer to the extensive General Information topics.
The CBVault component is available on all platforms, supported by the CBFS Storage product.
Getting Started
Each CBVault component instance can control a single vault at once. Applications can use multiple instances of the CBVault component if their use-case requires multiple vaults.
Here's how to get up and running:
- Create or open a vault by calling the OpenVault method.
- Interact with the vault, and its contents, using the CBVault component's API methods.
- When done, call the CloseVault method to close the vault.
Property List
The following is the full list of the properties of the component with short descriptions. Click on the links for further details.
Active | Whether a vault has been opened. |
AutoCompactAt | The free space percentage threshold a vault must reach to be eligible for automatic compaction. |
CallbackMode | Whether the component should operate in callback mode. |
CaseSensitive | Whether the component should open a vault in case-sensitive mode. |
DefaultFileCompression | The default compression mode to use when creating files and alternate streams. |
DefaultFileEncryption | The default encryption mode to use when creating files and alternate streams. |
DefaultFilePassword | The default encryption password to use when creating or opening files and alternate streams. |
IsCorrupted | Whether the vault is corrupted. |
LastWriteTime | The last modification time of the vault. |
Logo | An application-defined text-based logo stored in the second page of a vault. |
PageSize | The vault's page size. |
PathSeparator | The path separator character to use when returning vault paths. |
PossibleFreeSpace | The maximum amount of free space the vault could possibly have available. |
PossibleSize | The maximum size the vault could possibly be. |
ReadOnly | Whether the component should open a vault in read-only mode. |
Tag | Stores application-defined data specific to this instance of the component. |
UseAccessTime | Whether the component should keep track of last access times for vault items. |
UseJournaling | Whether the component should open a vault in journaling mode. |
UseSystemCache | Whether the operating system's cache is used. |
VaultEncryption | The whole-vault encryption mode. |
VaultFile | The vault to create and/or open. |
VaultFreeSpace | The actual amount of free space the vault has available. |
VaultPassword | The whole-vault encryption password. |
VaultSize | The actual size of the vault. |
VaultSizeMax | The maximum size a vault can be. |
VaultSizeMin | The minimum size a vault can be. |
VaultState | Information about the state of the vault. |
Method List
The following is the full list of the methods of the component with short descriptions. Click on the links for further details.
cacheFilePassword | Caches an encryption password to use the next time a file or alternate stream is accessed. |
checkAndRepair | Checks a vault's consistency and repairs it as necessary. |
checkFilePassword | Verifies whether a particular file password is correct. |
checkVaultPassword | Verifies whether a particular vault password is correct. |
closeVault | Closes the vault. |
compactVault | Compacts the vault. |
config | Sets or retrieves a configuration setting. |
copyFromVault | Copies files and directories from the vault to a physical filesystem. |
copyToVault | Copies files and directories from a physical filesystem to the vault. |
createDirectory | Creates a new directory in the vault. |
createLink | Creates a symbolic link to another file in the vault. |
deleteFile | Deletes a vault item. |
deleteFileTag | Deletes a file tag. |
fileExists | Checks whether a vault item exists. |
fileMatchesMask | Checks whether a particular file or directory name matches the specified mask. |
fileTagExists | Checks whether a file tag exists. |
findClose | Closes a search operation and releases any associated resources. |
findFirst | Searches for the first vault item that matches the specified name and attributes. |
findFirstByQuery | Searches for the first file or directory whose file tags match the specified query. |
findNext | Searches for the next vault item that matches an ongoing search operation. |
getFileAttributes | Retrieves the attributes of a vault item. |
getFileCompression | Retrieves the compression mode of a file or alternate stream. |
getFileCreationTime | Retrieves the creation time of a vault item. |
getFileEncryption | Retrieves the encryption mode of a file or alternate stream. |
getFileLastAccessTime | Retrieves the last access time of a vault item. |
getFileMetadataSize | Retrieves the size of the metadata associated with a vault item. |
getFileModificationTime | Retrieves the modification time of a vault item. |
getFileSize | Retrieves the size of a file or alternate stream. |
getFileTag | Retrieves the binary data held by a raw file tag attached to the specified vault item. |
getFileTagAsAnsiString | Retrieves the value of an AnsiString-typed file tag attached to the specified vault item. |
getFileTagAsBoolean | Retrieves the value of a Boolean-typed file tag attached to the specified vault item. |
getFileTagAsDateTime | Retrieves the value of a DateTime-typed file tag attached to the specified vault item. |
getFileTagAsNumber | Retrieves the value of a Number-typed file tag attached to the specified vault item. |
getFileTagAsString | Retrieves the value of a String-typed file tag attached to the specified vault item. |
getFileTagDataType | Retrieves the data type of a typed file tag attached to a specific vault item. |
getFileTagSize | Retrieves the size of a raw file tag attached to the specified vault item. |
getOriginatorProcessId | Retrieves the Id of the process (PID) that initiated the operation. |
getOriginatorProcessName | Retrieves the name of the process that initiated the operation. |
getOriginatorThreadId | Retrieves the Id of the thread that initiated the operation (Windows only). |
getOriginatorToken | Retrieves the security token associated with the process that initiated the operation (Windows only). |
getSearchResultAttributes | Retrieves the attributes of a vault item found during a search operation. |
getSearchResultCreationTime | Retrieves the creation time of a vault item found during a search operation. |
getSearchResultFullName | Retrieves the fully-qualified name of a vault item found during a search operation. |
getSearchResultLastAccessTime | Retrieves the last access time of a vault item found during a search operation. |
getSearchResultLinkDestination | Retrieves the destination of a symbolic link found during a search operation. |
getSearchResultMetadataSize | Retrieves the size of the metadata associated with a vault item found during a search operation. |
getSearchResultModificationTime | Retrieves the modification time of a vault item found during a search operation. |
getSearchResultName | Retrieves the name of a vault item found during a search operation. |
getSearchResultSize | Retrieves the size of a vault item found during a search operation. |
isCBFSStorageVault | Checks whether a local file is a CBFS Storage vault. |
isDirectoryEmpty | Checks whether a directory is empty. |
moveFile | Renames or moves a vault item. |
openFile | Opens a new or existing file or alternate stream in the vault. |
openFileEx | Opens a new or existing file or alternate stream in the vault. |
openRootData | Opens the vault's root data stream. |
openVault | Opens a new or existing vault. |
resolveLink | Retrieves the destination of a symbolic link. |
setFileAttributes | Sets the attributes of a vault item. |
setFileCompression | Compresses or decompresses a file or alternate stream. |
setFileCreationTime | Sets the creation time of a vault item. |
setFileEncryption | Encrypts, decrypts, or changes the encryption password of a file or alternate stream. |
setFileLastAccessTime | Sets the last access time of a vault item. |
setFileModificationTime | Sets the modification time of a vault item. |
setFileSize | Sets the size of a file or alternate stream. |
setFileTag | Attaches a raw file tag with binary data to the specified vault item. |
setFileTagAsAnsiString | Attaches an AnsiString-typed file tag to the specified vault item. |
setFileTagAsBoolean | Attaches a Boolean-typed file tag to the specified vault item. |
setFileTagAsDateTime | Attaches a DateTime-typed file tag to the specified vault item. |
setFileTagAsNumber | Attaches a Number-typed file tag to the specified vault item. |
setFileTagAsString | Attaches a String-typed file tag to the specified vault item. |
updateVaultEncryption | Encrypts, decrypts, or changes the encryption password of the vault. |
Event List
The following is the full list of the events fired by the component with short descriptions. Click on the links for further details.
DataCompress | Fires to compress a block of data using a custom compression algorithm. |
DataDecompress | Fires to decompress a block of data using a custom compression algorithm. |
DataDecrypt | Fires to decrypt a block of data using a custom encryption implementation. |
DataEncrypt | Fires to encrypt a block of data using a custom encryption implementation. |
Error | Fires if an unhandled error occurs during an event. |
FilePasswordNeeded | Fires if a password is needed to open an encrypted file. |
HashCalculate | Fires to calculate a password hash using a custom hashing implementation. |
KeyDerive | Fires to derive an encryption key using a custom key derivation implementation. |
Progress | Fires to indicate the progress of long-running vault operations. |
VaultClose | Fires to close a callback mode vault. |
VaultDelete | Fires to delete a callback mode vault. |
VaultFlush | Fires to flush a callback mode vault's data out to storage. |
VaultGetParentSize | Fires to determine how much free space is available for growing a callback mode vault. |
VaultGetSize | Fires to determine the size of a callback mode vault. |
VaultOpen | Fires to open a new or existing callback mode vault. |
VaultRead | Fires to read data from a callback mode vault. |
VaultSetSize | Fires to resize a callback mode vault. |
VaultWrite | Fires to write data to a callback mode vault. |
Configuration Settings
The following is a list of configuration settings for the component with short descriptions. Click on the links for further details.
AllowMoveStreamsBetweenFiles | Whether alternate streams may be moved from one file to another. |
AlwaysJournalMetadata | Whether filesystem structure is always saved during modification, like in Journaling mode. |
AutoCompactDelay | How long a vault must remain idle before starting automatic compaction. |
DefaultFileCompressionLevel | The default compression level to use when creating files and alternate streams. |
MaxNonPagedNameLength | The maximum number of name characters to store directly within a vault item. |
PageCacheSize | The size of the in-memory vault page cache. |
PartSize | The part size used by a multipart vault. |