Class: WSDrive

WSDrive()

SalmonDrive implementation for a Web Service-based drive. This provides a virtual drive implementation that you can access read-only encrypted files remotely. Use static methods open() or create() to create an instance.

Constructor

new WSDrive()

Private constructor, use open() instead.
Source:

Classes

WSDrive

Methods

getPrivateDir() → {IFile}

Get a private dir for sharing files with external applications.
Source:
Throws:
Exception
Returns:
The private dir
Type
IFile

getVirtualFile(file) → {AesFile}

Parameters:
Name Type Description
file IFile The real file.
Source:
Returns:
The encrypted file.
Type
AesFile

onUnlockError()

When authorization fails.
Source:

onUnlockSuccess()

When authorization succeed.
Source:

(async, static) create(dir, password, sequencer) → {Promise.<AesDrive>}

Helper method that creates and initializes a WSDrive
Parameters:
Name Type Description
dir IFile The directory that will host the drive. This should be a WSFile with the correct service path and credentials.
password string The password.
sequencer ISalmonSequencer The nonce sequencer that will be used for encryption.
Source:
Throws:
IOException If error occurs during creating the drive.
Returns:
The drive.
Type
Promise.<AesDrive>

(async, static) open(dir, password, sequenceropt) → {Promise.<AesDrive>}

Helper method that opens and initializes a WSDrive
Parameters:
Name Type Attributes Description
dir IFile The real directory that contains the drive.
password string Text password to use with this drive.
sequencer ISalmonSequencer <optional>
Optional nonce sequencer that will be used for importing files.
Source:
Returns:
The drive.
Type
Promise.<AesDrive>