CBFS Storage 2020 Node.js Edition

Questions / Feedback?

EjectVolume Method

Ejects a removable storage volume formatted with the CBFS Storage filesystem. (Windows only).

Syntax

cbdrive.ejectVolume(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

If the currently-open vault resides on a removable storage volume formatted with the CBFS Storage filesystem (i.e., if the vault was opened using the OpenVolume method), this method can be used to eject it. If this method is successful, the vault is closed, and the volume is made available for removal (similar to how the "Eject" functionality provided by Windows Explorer works).

The Force parameter specifies whether the removable storage volume should be forcefully ejected. If Force is false, this method will fail if the vault is currently in use by the system or other applications.

Note: This method can only be called when Active is true, and cannot be called within events.

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