Click or drag to resize
GDStorageFileExportFromSecureStorageAsync Method (IStorageFolder, String, NameCollisionOption)
Exports an encrypted file from BlackBerry Dynamics secure storage to an external unencrypted location and changes name of exported 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 IAsyncOperation<StorageFile> ExportFromSecureStorageAsync(
	IStorageFolder destinationFolder,
	string desiredNewName,
	NameCollisionOption option
)

Parameters

destinationFolder
Type: Windows.StorageIStorageFolder
Folder from Windows file system where file will be exported.
desiredNewName
Type: SystemString
The desired name of the file in the Windows 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: IAsyncOperationStorageFile
When this method completes, it returns a StorageFile that represents unencrypted file from Windows file system which is an exact copy of exported (encrypted) file.
Exceptions
ExceptionCondition
ExceptionA file with the specified desiredName already exists in the destinationFolder or some unexpected error occurred.
AccessDeniedExceptionSecure storage was remotely wiped or you don't have permission to create a file in the current folder.
InvalidArgumentExceptionThe format of the filename is incorrect. Check the value of desiredName.
Remarks

Note: Windows file system is case-insensitive, but BlackBerry Dynamics Secure Storage is case-sensitive. That means that exporting two separate GDStorageFiles to the same destinationFolder can cause a name collision (e.g. "Test.txt" and "tets.txt")

GDStorageFile after export isn't deleted.

See Also