SaveKeyring Method
Saves the current Keyring to disk.
Syntax
keymgr.saveKeyring(keyringPath, [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 saves the current keyring to disk. There are two output options. The keyring may either be saved to a single key file or may be saved to a directory.
To save the keyring to a directory set KeyringPath to the path. The directory must already exist. The class will create a "pubring.gpg" and "secring.gpg" file in the specified directory. If the files already exist they will be overwritten.
To save the keyring to a key file set KeyringPath to a path and file name. If the file already exists it will be overwritten.