CBFS Vault 2020 Python Edition

Questions / Feedback?

CBVault Class

Properties   Methods   Events   Configuration Settings   Errors  

The CBVault class lets applications create a vault and manipulate its contents.

Syntax

class cbfsvault.CBVault

Remarks

The CBVault class 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 Vault's many features, please refer to the extensive General Information topics.

The CBVault class is available on all platforms, supported by the CBFS Vault product.

Getting Started

Each CBVault class instance can control a single vault at once. Applications can use multiple instances of the CBVault class if their use-case requires multiple vaults.

Here's how to get up and running:

  1. Create or open a vault by calling the open_vault method.
  2. Interact with the vault, and its contents, using the CBVault class's API methods.
  3. When done, call the close_vault method to close the vault.

Property List


The following is the full list of the properties of the class with short descriptions. Click on the links for further details.

activeWhether a vault has been opened.
auto_compact_atThe free space percentage threshold a vault must reach to be eligible for automatic compaction.
callback_modeWhether the class should operate in callback mode.
case_sensitiveWhether the class should open a vault in case-sensitive mode.
default_file_compressionThe default compression mode to use when creating files and alternate streams.
default_file_encryptionThe default encryption mode to use when creating files and alternate streams.
default_file_passwordThe default encryption password to use when creating or opening files and alternate streams.
is_corruptedWhether the vault is corrupted.
last_write_timeThe last modification time of the vault.
logoAn application-defined text-based logo stored in the second page of a vault.
page_sizeThe vault's page size.
path_separatorThe path separator character to use when returning vault paths.
possible_free_spaceThe maximum amount of free space the vault could possibly have available.
possible_sizeThe maximum size the vault could possibly be.
read_onlyWhether the class should open a vault in read-only mode.
tagStores application-defined data specific to this instance of the class.
use_access_timeWhether the class should keep track of last access times for vault items.
use_journalingWhether the class should open a vault in journaling mode.
use_system_cacheWhether the operating system's cache is used.
vault_encryptionThe whole-vault encryption mode.
vault_fileThe vault to create and/or open.
vault_free_spaceThe actual amount of free space the vault has available.
vault_passwordThe whole-vault encryption password.
vault_sizeThe actual size of the vault.
vault_size_maxThe maximum size a vault can be.
vault_size_minThe minimum size a vault can be.
vault_stateInformation about the state of the vault.

Method List


The following is the full list of the methods of the class with short descriptions. Click on the links for further details.

cache_file_passwordCaches an encryption password to use the next time a file or alternate stream is accessed.
check_and_repairChecks a vault's consistency and repairs it as necessary.
check_file_passwordVerifies whether a particular file password is correct.
check_vault_passwordVerifies whether a particular vault password is correct.
close_vaultCloses the vault.
compact_vaultCompacts the vault.
configSets or retrieves a configuration setting.
copy_from_vaultCopies files and directories from the vault to a physical filesystem.
copy_to_vaultCopies files and directories from a physical filesystem to the vault.
create_directoryCreates a new directory in the vault.
create_linkCreates a symbolic link to another file in the vault.
delete_fileDeletes a vault item.
delete_file_tagDeletes a file tag.
file_existsChecks whether a vault item exists.
file_matches_maskChecks whether a particular file or directory name matches the specified mask.
file_tag_existsChecks whether a file tag exists.
find_closeCloses a search operation and releases any associated resources.
find_firstSearches for the first vault item that matches the specified name and attributes.
find_first_by_querySearches for the first file or directory whose file tags match the specified query.
find_nextSearches for the next vault item that matches an ongoing search operation.
get_file_attributesRetrieves the attributes of a vault item.
get_file_compressionRetrieves the compression mode of a file or alternate stream.
get_file_creation_timeRetrieves the creation time of a vault item.
get_file_encryptionRetrieves the encryption mode of a file or alternate stream.
get_file_last_access_timeRetrieves the last access time of a vault item.
get_file_modification_timeRetrieves the modification time of a vault item.
get_file_sizeRetrieves the size of a file or alternate stream.
get_file_tagRetrieves the binary data held by a raw file tag attached to the specified vault item.
get_file_tag_as_ansi_stringRetrieves the value of an AnsiString-typed file tag attached to the specified vault item.
get_file_tag_as_booleanRetrieves the value of a Boolean-typed file tag attached to the specified vault item.
get_file_tag_as_date_timeRetrieves the value of a DateTime-typed file tag attached to the specified vault item.
get_file_tag_as_numberRetrieves the value of a Number-typed file tag attached to the specified vault item.
get_file_tag_as_stringRetrieves the value of a String-typed file tag attached to the specified vault item.
get_file_tag_data_typeRetrieves the data type of a typed file tag attached to a specific vault item.
get_file_tag_sizeRetrieves the size of a raw file tag attached to the specified vault item.
get_search_result_attributesRetrieves the attributes of a vault item found during a search operation.
get_search_result_creation_timeRetrieves the creation time of a vault item found during a search operation.
get_search_result_full_nameRetrieves the fully-qualified name of a vault item found during a search operation.
get_search_result_last_access_timeRetrieves the last access time of a vault item found during a search operation.
get_search_result_link_destinationRetrieves the destination of a symbolic link found during a search operation.
get_search_result_metadata_sizeRetrieves the size of the metadata associated with a vault item found during a search operation.
get_search_result_modification_timeRetrieves the modification time of a vault item found during a search operation.
get_search_result_nameRetrieves the name of a vault item found during a search operation.
get_search_result_sizeRetrieves the size of a vault item found during a search operation.
is_directory_emptyChecks whether a directory is empty.
is_valid_vaultChecks whether a local file is a CBFS Vault vault.
move_fileRenames or moves a vault item.
open_fileOpens a new or existing file or alternate stream in the vault.
open_file_exOpens a new or existing file or alternate stream in the vault.
open_root_dataOpens the vault's root data stream.
open_vaultOpens a new or existing vault.
resolve_linkRetrieves the destination of a symbolic link.
set_file_attributesSets the attributes of a vault item.
set_file_compressionCompresses or decompresses a file or alternate stream.
set_file_creation_timeSets the creation time of a vault item.
set_file_encryptionEncrypts, decrypts, or changes the encryption password of a file or alternate stream.
set_file_last_access_timeSets the last access time of a vault item.
set_file_modification_timeSets the modification time of a vault item.
set_file_sizeSets the size of a file or alternate stream.
set_file_tagAttaches a raw file tag with binary data to the specified vault item.
set_file_tag_as_ansi_stringAttaches an AnsiString-typed file tag to the specified vault item.
set_file_tag_as_booleanAttaches a Boolean-typed file tag to the specified vault item.
set_file_tag_as_date_timeAttaches a DateTime-typed file tag to the specified vault item.
set_file_tag_as_numberAttaches a Number-typed file tag to the specified vault item.
set_file_tag_as_stringAttaches a String-typed file tag to the specified vault item.
update_vault_encryptionEncrypts, decrypts, or changes the encryption password of the vault.

Event List


The following is the full list of the events fired by the class with short descriptions. Click on the links for further details.

on_data_compressFires to compress a block of data using a custom compression algorithm.
on_data_decompressFires to decompress a block of data using a custom compression algorithm.
on_data_decryptFires to decrypt a block of data using a custom encryption implementation.
on_data_encryptFires to encrypt a block of data using a custom encryption implementation.
on_errorFires if an unhandled error occurs during an event.
on_file_password_neededFires if a password is needed to open an encrypted file.
on_hash_calculateFires to calculate a password hash using a custom hashing implementation.
on_key_deriveFires to derive an encryption key using a custom key derivation implementation.
on_progressFires to indicate the progress of long-running vault operations.
on_vault_closeFires to close a callback mode vault.
on_vault_deleteFires to delete a callback mode vault.
on_vault_flushFires to flush a callback mode vault's data out to storage.
on_vault_get_parent_sizeFires to determine how much free space is available for growing a callback mode vault.
on_vault_get_sizeFires to determine the size of a callback mode vault.
on_vault_openFires to open a new or existing callback mode vault.
on_vault_readFires to read data from a callback mode vault.
on_vault_set_sizeFires to resize a callback mode vault.
on_vault_writeFires to write data to a callback mode vault.

Configuration Settings


The following is a list of configuration settings for the class with short descriptions. Click on the links for further details.

AllowMoveStreamsBetweenFilesWhether alternate streams may be moved from one file to another.
AlwaysJournalMetadataWhether filesystem structure is always saved during modification, like in Journaling mode.
AutoCompactDelayHow long a vault must remain idle before starting automatic compaction.
DefaultFileCompressionLevelThe default compression level to use when creating files and alternate streams.
MaxNonPagedNameLengthThe maximum number of name characters to store directly within a vault item.
PageCacheSizeThe size of the in-memory vault page cache.
PartSizeThe part size used by a multipart vault.
BuildInfoInformation about the product's build.
LicenseInfoInformation about the current license.

Copyright (c) 2021 Callback Technologies, Inc. - All rights reserved.
CBFS Vault 2020 Python Edition - Version 20.0 [Build 7982]