| GDStorageFileMoveToSecureStorageAsync Method (IStorageFile, IGDStorageFolder, String, NameCollisionOption) |
Moves external file to BlackBerry Dynamics secure storage and changes name of moved file. This method also specifies what to do if a file with the same name already exists in the destination folder.
Namespace:
GD
Assembly:
GD (in GD.dll) Version: 255.255.255.255
Syntax public static IAsyncOperation<GDStorageFile> MoveToSecureStorageAsync(
IStorageFile file,
IGDStorageFolder destinationFolder,
string desiredNewName,
NameCollisionOption option
)
public:
static IAsyncOperation<GDStorageFile^>^ MoveToSecureStorageAsync(
[InAttribute] IStorageFile^ file,
[InAttribute] IGDStorageFolder^ destinationFolder,
[InAttribute] String^ desiredNewName,
[InAttribute] NameCollisionOption^ option
)
GD.GDStorageFile.MoveToSecureStorageAsync = function(file, destinationFolder, desiredNewName, option);
Parameters
- file
- Type: Windows.StorageIStorageFile
External file to be moved. - destinationFolder
- Type: GDIGDStorageFolder
Folder from BlackBerry Dynamics secure storage where file will be moved. - desiredNewName
- Type: SystemString
The desired name of the file in the SDK secure folder. - option
- Type: Windows.StorageNameCollisionOption
One of the enumeration values that determines how to handle the collision if a file with the same name already exists in the destinationFolder.
Return Value
Type:
IAsyncOperationGDStorageFileWhen this method completes, it returns a
GDStorageFile that represents moved file to secure storage.
Exceptions Exception | Condition |
---|
Exception | A file with the specified desiredName already exists in the current folder or some unexpected error occurred. |
AccessDeniedException | Secure storage was remotely wiped. |
InvalidArgumentException | The format of the filename is incorrect. Check the value of desiredName. |
Remarks When this method completes it tries to zero-out and then delete an original file. If for some reason application could not get write access to file stream it will just copy (not move) the file to secure storage.
See Also