CopyFromVault Method

Copies files and directories from the vault to a physical filesystem.

Syntax

ANSI (Cross Platform)
int CopyFromVault(const char* lpszVaultPath, const char* lpszSystemPath, const char* lpszMask, int iFlags, const char* lpszPassword);

Unicode (Windows)
INT CopyFromVault(LPCWSTR lpszVaultPath, LPCWSTR lpszSystemPath, LPCWSTR lpszMask, INT iFlags, LPCWSTR lpszPassword);
- (void)copyFromVault:(NSString*)vaultPath :(NSString*)systemPath :(NSString*)mask :(int)flags :(NSString*)password;
#define MID_CBVAULT_COPYFROMVAULT 9

CBFSVAULT_EXTERNAL int CBFSVAULT_CALL CBFSVault_CBVault_Do(void *lpObj, int methid, int cparam, void *param[], int cbparam[], int64 *lpllVal);

Remarks

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_NONE0x00000000Never overwrite destination files.

CBFSSTORAGE_CFF_OVERWRITE_IF_NEWER0x00000001Overwrite a destination file only if the source file is newer.

CBFSSTORAGE_CFF_OVERWRITE_ALL0x00000002Always overwrite destination files.

CBFSSTORAGE_CFF_INCLUDE_SUBDIRS_WITH_CONTENTS0x00010000Include all subdirectories in source directory, and their contents, recursively.

CBFSSTORAGE_CFF_INCLUDE_SUBDIRS_NO_CONTENTS0x00020000Include 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.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

Copyright (c) 2021 Callback Technologies, Inc. - All rights reserved.
CBFS Vault 2020 C++ Edition - Version 20.0 [Build 7986]