Click or drag to resize
GDStorageFileMoveToSecureStorageAsync Method (IStorageFile, IGDStorageFolder)
Moves external file to BlackBerry Dynamics secure storage.

Namespace:  GD
Assembly:  GD (in GD.dll) Version: 255.255.255.255
Syntax
public static IAsyncOperation<GDStorageFile> MoveToSecureStorageAsync(
	IStorageFile file,
	IGDStorageFolder destinationFolder
)

Parameters

file
Type: Windows.StorageIStorageFile
External file to be moved.
destinationFolder
Type: GDIGDStorageFolder
Folder from BlackBerry Dynamics secure storage where file will be moved.

Return Value

Type: IAsyncOperationGDStorageFile
When this method completes, it returns a GDStorageFile that represents moved file to secure storage.
Exceptions
ExceptionCondition
ExceptionA file with the specified desiredName already exists in the current folder or some unexpected error occurred.
AccessDeniedExceptionSecure storage was remotely wiped.
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.

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 MoveToSecureStorageAsync(IStorageFile, IGDStorageFolder, NameCollisionOption) method.

See Also