Click or drag to resize
GDStorageFileExportFromSecureStorageAsync Method (IStorageFolder, String)
Exports an encrypted file from BlackBerry Dynamics secure storage to an external unencrypted location and changes name of exported file.

Namespace:  GD
Assembly:  GD (in GD.dll) Version: 255.255.255.255
Syntax
public IAsyncOperation<StorageFile> ExportFromSecureStorageAsync(
	IStorageFolder destinationFolder,
	string desiredNewName
)

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.

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

This method uses the FailIfExists value from the NameCollisionOption enumeration by default. That is, this method raises an exception if a file with the same name already exists in the destination folder. If you want to handle a file name collision in a different way, call the ExportFromSecureStorageAsync(IStorageFolder, String, NameCollisionOption) method.

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