CBFS Storage 2020 Node.js Edition

Questions / Feedback?

VaultState Property

Information about the state of the vault.

Syntax

 cbdrive.getVaultState([callback])

Default Value

0

Callback

The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).

The callback for the getVaultState([callback]) method is defined as:

function(err, data){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'data' is the value returned by the method.

The callback for the setVaultState([callback]) method is defined as:

function(err){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'err' has 2 properties which hold detailed information:

err.code
err.message

Remarks

This property reflects the current state of the vault; its value consists of one or more of the following flags, OR'd together:

CBFSSTORAGE_ST_FIXED_SIZE0x00000001The vault is fixed-size.

CBFSSTORAGE_ST_READ_ONLY0x00000002The vault was opened in read-only mode.

Please refer to the ReadOnly property for more information.

CBFSSTORAGE_ST_CORRUPTED0x00000004The vault is corrupted.

Applications can use the CheckAndRepair method to try to repair vault corruption. Please refer to the Vault Corruption topic for more information.

CBFSSTORAGE_ST_TRANSACTIONS_USED0x00000008The vault was opened in journaling mode.

Please refer to the UseJournaling property for more information.

CBFSSTORAGE_ST_ACCESS_TIME_USED0x00000010Last access times are being tracked.

Please refer to the UseAccessTime property for more information.

CBFSSTORAGE_ST_ENCRYPTED0x00000020The vault is encrypted with whole-vault encryption.

Please refer to the Encryption topic for more information.

CBFSSTORAGE_ST_VALID_PASSWORD_SET0x00000040The correct whole-vault encryption password has been provided.

Please refer to the Encryption topic for more information.

CBFSSTORAGE_ST_PHYSICAL_VOLUME0x00000080The vault is backed by a storage volume or partition formatted with the CBFS Storage filesystem.

This flag only applies when using the CBDrive class.

CBFSSTORAGE_ST_PARTED0x00000100The vault's contents are split across multiple files on disk.

Please refer to the Multipart Vaults topic for more information.

This property is read-only and not available at design time.

Data Type

Integer

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