CBFS Storage 2020 Node.js Edition

Questions / Feedback?

CloseVault Method

Closes the vault.

Syntax

cbmemdrive.closeVault(force, [callback])

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 this 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 method closes the currently-open vault.

For CBDrive, the Force parameter specifies whether to forcefully close any file or directory handles open currently. If Force is false, this method will fail if any handles are currently open. (In CBVault, the Force parameter's value is ignored.)

Note: This method can only be called when Active is true.

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