Click or drag to resize
GDStorageFileRenameAsync Method (String, NameCollisionOption)
Renames the current file. This method also specifies what to do if an existing item in the current file's location has the same name.

Namespace:  GD
Assembly:  GD (in GD.dll) Version: 255.255.255.255
Syntax
public IAsyncAction RenameAsync(
	string desiredName,
	NameCollisionOption option
)

Parameters

desiredName
Type: SystemString

The desired, new name of the current item.

If there is an existing item in the current file's location that already has the specified desiredName, the specified NameCollisionOption determines how BlackBerry Dynamics responds to the conflict.

option
Type: Windows.StorageNameCollisionOption
The enum value that determines how BlackBerry Dynamics responds if the desiredName is the same as the name of an existing item in the current file's location.

Return Value

Type: IAsyncAction
No object or value is returned by this method when it completes.

Implements

IGDStorageItemRenameAsync(String, NameCollisionOption)
IGDStorageItemRenameAsync(String, NameCollisionOption)
Exceptions
ExceptionCondition
Exception(C# equivalent: System.COMException) File cannot be renamed. HResult E_FAIL.
AccessDeniedException(C# equivalent: System.UnauthorizedAccessException) Secure storage was remotely wiped or directory with the same name already exists.
InvalidArgumentException(C# equivalent: System.ArgumentException) The name contains invalid characters, or the format of the path is incorrect. Check the value of desiredName.
See Also