Copies files and directories from the vault to a physical filesystem.
cbvault.copyFromVault(vaultPath, systemPath, mask, flags, password, [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:
'err' is the error that occurred. If there was no error, then 'err' is 'null'.
'err' has 2 properties which hold detailed information:
This method copies the files and directories at the specified VaultPath to a physical filesystem location, specified by SystemPath. Only the files and directories whose names match the specified Mask are copied.
The values passed for VaultPath and SystemPath must be vault-local and system-local absolute paths, respectively. The value passed for Mask may contain wildcard characters.
The Flags parameter is used to control recursion and overwrite behavior, and should be set by OR'ing together zero or more of the following flags:
|CBFSSTORAGE_CFF_OVERWRITE_NONE||0x00000000||Never overwrite destination files.|
|CBFSSTORAGE_CFF_OVERWRITE_IF_NEWER||0x00000001||Overwrite a destination file only if the source file is newer.|
|CBFSSTORAGE_CFF_OVERWRITE_ALL||0x00000002||Always overwrite destination files.|
|CBFSSTORAGE_CFF_INCLUDE_SUBDIRS_WITH_CONTENTS||0x00010000||Include all subdirectories in source directory, and their contents, recursively.|
|CBFSSTORAGE_CFF_INCLUDE_SUBDIRS_NO_CONTENTS||0x00020000||Include all subdirectories in the source directory, without their contents.|
The Password parameter specifies the password to use to access files' data, if they are encrypted.
Note: This method can only be called when Active is true, and cannot be called within events.