CBFS Storage 2020 Node.js Edition

Questions / Feedback?

CBMemDrive Class

Properties   Methods   Events   Configuration Settings   Errors  

The CBMemDrive class lets applications create an in-memory vault, accessible to all or some processes as a regular disk.

Syntax

cbfsstorage.cbmemdrive()

Remarks

The CBMemDrive class allows applications to create an in-memory 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.

No data is ever stored on disk, all data is stored in memory. The CBMemDrive class is available on all platforms, supported by the CBFS Storage product.

Getting Started

Each CBMemDrive class instance can control a single vault at once. Applications can use multiple instances of the CBMemDrive 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 CreateVault method.
  2. Interact with the vault, and its contents, using the CBMemDrive class's API methods.
  3. When done, call the CloseVault 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.

AccessDeniedProcessCountThe number of records in the AccessDeniedProcess arrays.
AccessDeniedProcessDesiredAccessThe kind of access granted or denied.
AccessDeniedProcessIncludeChildrenWhether child processes are affected.
AccessDeniedProcessIdThe Id of the target process.
AccessDeniedProcessNameThe filename of the target process's executable.
AccessGrantedProcessCountThe number of records in the AccessGrantedProcess arrays.
AccessGrantedProcessDesiredAccessThe kind of access granted or denied.
AccessGrantedProcessIncludeChildrenWhether child processes are affected.
AccessGrantedProcessIdThe Id of the target process.
AccessGrantedProcessNameThe filename of the target process's executable.
ActiveWhether a vault has been opened and mounted as a virtual drive.
AutoCompactAtThe free space percentage threshold a vault must reach to be eligible for automatic compaction.
CaseSensitiveWhether the class should open a vault in case-sensitive mode.
DefaultFileCompressionThe default compression mode to use when creating files and alternate streams.
DefaultFileEncryptionThe default encryption mode to use when creating files and alternate streams.
DefaultFilePasswordThe default encryption password to use when creating or opening files and alternate streams.
FileSystemNameThe name of the virtual filesystem.
IsCorruptedWhether the vault is corrupted.
LastWriteTimeThe last modification time of the vault.
LogoAn application-defined text-based logo stored in the second page of a vault.
MountingPointCountThe number of records in the MountingPoint arrays.
MountingPointAuthenticationIdThe Authentication ID used when creating the mounting point, if applicable.
MountingPointFlagsThe flags used to create the mounting point.
MountingPointNameThe mounting point name.
PageSizeThe vault's page size.
PathSeparatorThe path separator character to use when returning vault paths.
PossibleFreeSpaceThe maximum amount of free space the vault could possibly have available.
PossibleSizeThe maximum size the vault could possibly be.
ProcessRestrictionsEnabledWhether process access restrictions are enabled.
ReadOnlyWhether the class should open a vault in read-only mode.
ReportPossibleSizeHow the class should report the virtual drive's size and free space to the OS.
StorageCharacteristicsThe characteristic flags to create the virtual drive with. (Windows only).
StorageTypeThe type of virtual drive to create. (Windows only).
TagStores application-defined data specific to this instance of the class.
TimeoutHow long vault events may execute before timing out. (Windows only).
UseAccessTimeWhether the class should keep track of last access times for vault items.
VaultEncryptionThe whole-vault encryption mode.
VaultFreeSpaceThe actual amount of free space the vault has available.
VaultPasswordThe whole-vault encryption password.
VaultSizeThe actual size of the vault.
VaultSizeMaxThe maximum size a vault can be.
VaultSizeMinThe minimum size a vault can be.
VaultStateInformation 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.

AddDeniedProcessAdds a rule that prevents a process from accessing the virtual drive.
AddGrantedProcessAdds a rule that allows a process to access the virtual drive.
AddMountingPointAdds a mounting point for the virtual drive.
CacheFilePasswordCaches an encryption password to use the next time a file or alternate stream is accessed.
CheckAndRepairChecks a vault's consistency and repairs it as necessary.
CheckFilePasswordVerifies whether a particular file password is correct.
CheckVaultPasswordVerifies whether a particular vault password is correct.
CloseVaultCloses the vault.
CompactVaultCompacts the vault.
ConfigSets or retrieves a configuration setting.
ConvertToDrivePathConverts a vault-local vault item path to a virtual drive file path.
ConvertToVaultPathConverts a virtual drive file path to a vault-local vault item path.
CreateDirectoryCreates a new directory in the vault.
CreateLinkCreates a symbolic link to another file in the vault.
CreateVaultCreates an in-memory vault.
DeleteFileDeletes a vault item.
DeleteFileTagDeletes a file tag.
FileExistsChecks whether a vault item exists.
FileMatchesMaskChecks whether a particular file or directory name matches the specified mask.
FileTagExistsChecks whether a file tag exists.
FindCloseCloses a search operation and releases any associated resources.
FindFirstSearches for the first vault item that matches the specified name and attributes.
FindFirstByQuerySearches for the first file or directory whose file tags match the specified query.
FindNextSearches for the next vault item that matches an ongoing search operation.
GetDriverStatusRetrieves the status of the system driver.
GetFileAttributesRetrieves the attributes of a vault item.
GetFileCompressionRetrieves the compression mode of a file or alternate stream.
GetFileCreationTimeRetrieves the creation time of a vault item.
GetFileEncryptionRetrieves the encryption mode of a file or alternate stream.
GetFileLastAccessTimeRetrieves the last access time of a vault item.
GetFileModificationTimeRetrieves the modification time of a vault item.
GetFileSizeRetrieves the size of a file or alternate stream.
GetFileTagRetrieves the binary data held by a raw file tag attached to the specified vault item.
GetFileTagAsAnsiStringRetrieves the value of an AnsiString-typed file tag attached to the specified vault item.
GetFileTagAsBooleanRetrieves the value of a Boolean-typed file tag attached to the specified vault item.
GetFileTagAsDateTimeRetrieves the value of a DateTime-typed file tag attached to the specified vault item.
GetFileTagAsNumberRetrieves the value of a Number-typed file tag attached to the specified vault item.
GetFileTagAsStringRetrieves the value of a String-typed file tag attached to the specified vault item.
GetFileTagDataTypeRetrieves the data type of a typed file tag attached to a specific vault item.
GetFileTagSizeRetrieves the size of a raw file tag attached to the specified vault item.
GetModuleVersionRetrieves the version of a given product module.
GetOriginatorProcessIdRetrieves the Id of the process (PID) that initiated the operation.
GetOriginatorProcessNameRetrieves the name of the process that initiated the operation.
GetOriginatorThreadIdRetrieves the Id of the thread that initiated the operation. (Windows only).
GetOriginatorTokenRetrieves the security token associated with the process that initiated the operation. (Windows only).
GetSearchResultAttributesRetrieves the attributes of a vault item found during a search operation.
GetSearchResultCreationTimeRetrieves the creation time of a vault item found during a search operation.
GetSearchResultFullNameRetrieves the fully-qualified name of a vault item found during a search operation.
GetSearchResultLastAccessTimeRetrieves the last access time of a vault item found during a search operation.
GetSearchResultLinkDestinationRetrieves the destination of a symbolic link found during a search operation.
GetSearchResultMetadataSizeRetrieves the size of the metadata associated with a vault item found during a search operation.
GetSearchResultModificationTimeRetrieves the modification time of a vault item found during a search operation.
GetSearchResultNameRetrieves the name of a vault item found during a search operation.
GetSearchResultSizeRetrieves the size of a vault item found during a search operation.
InitializeInitializes the class.
InstallInstalls (or upgrades) the product's system drivers and/or helper DLL. (Windows only).
IsDirectoryEmptyChecks whether a directory is empty.
IsIconRegisteredChecks whether the specified icon is registered.
LoadFromFileCopies contents of a file-based vault into the in-memory vault.
MoveFileRenames or moves a vault item.
OpenFileOpens a new or existing file or alternate stream in the vault.
OpenFileExOpens a new or existing file or alternate stream in the vault.
OpenRootDataOpens the vault's root data stream.
RegisterIconRegisters an icon that can be displayed as an overlay on the virtual drive in Windows Explorer.
RemoveDeniedProcessRemoves a rule that prevents a process from accessing the virtual drive.
RemoveGrantedProcessRemoves a rule that allows a process to access the virtual drive.
RemoveMountingPointRemoves a mounting point for the virtual drive.
ResetIconResets the virtual drive's icon back to default by deselecting the active overlay icon.
ResolveLinkRetrieves the destination of a symbolic link.
SaveToFileCopies contents of the in-memory vault into a file-based vault.
SetFileAttributesSets the attributes of a vault item.
SetFileCompressionCompresses or decompresses a file or alternate stream.
SetFileCreationTimeSets the creation time of a vault item.
SetFileEncryptionEncrypts, decrypts, or changes the encryption password of a file or alternate stream.
SetFileLastAccessTimeSets the last access time of a vault item.
SetFileModificationTimeSets the modification time of a vault item.
SetFileSizeSets the size of a file or alternate stream.
SetFileTagAttaches a raw file tag with binary data to the specified vault item.
SetFileTagAsAnsiStringAttaches an AnsiString-typed file tag to the specified vault item.
SetFileTagAsBooleanAttaches a Boolean-typed file tag to the specified vault item.
SetFileTagAsDateTimeAttaches a DateTime-typed file tag to the specified vault item.
SetFileTagAsNumberAttaches a Number-typed file tag to the specified vault item.
SetFileTagAsStringAttaches a String-typed file tag to the specified vault item.
SetIconSelects a registered overlay icon for display on the virtual drive in Windows Explorer.
ShutdownSystemShuts down or reboots the operating system.
UninstallUninstalls the product's system drivers and/or helper DLL. (Windows only).
UnregisterIconUnregisters an existing overlay icon.
UpdateVaultEncryptionEncrypts, 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.

EjectedFires when the media and virtual drive have been ejected.
ErrorFires if an unhandled error occurs during an event.
FilePasswordNeededFires if a password is needed to open an encrypted file.
ProgressFires to indicate the progress of long-running vault operations.

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.
AsyncDeleteStorageNotificationsWhether system broadcasts for virtual drive deletion are sent asynchronously.
AutoCompactDelayHow long a vault must remain idle before starting automatic compaction.
DefaultFileCompressionLevelThe default compression level to use when creating files and alternate streams.
DeviceChangeBroadcastsEnabledWhether the user-mode API broadcasts WM_DEVICECHANGE messages.
LoggingEnabledWhether extended logging is enabled.
MaxNonPagedNameLengthThe maximum number of name characters to store directly within a vault item.
SupportSearchIndexerSpecifies whether the driver must take additional measures to support indexing by Windows Search.
VolumeGuidNameThe GUID of the mounted volume.

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