Skip to content

Latest commit

 

History

History
35 lines (26 loc) · 1.09 KB

storagefolder_renameasync_247762898.md

File metadata and controls

35 lines (26 loc) · 1.09 KB
-api-id -api-type
M:Windows.Storage.StorageFolder.RenameAsync(System.String)
winrt method

Windows.Storage.StorageFolder.RenameAsync

-description

Renames the current folder.

-parameters

-param desiredName

The desired, new name for the current folder.

-returns

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

-remarks

If the name you specify is invalid, this method (and its overload) throws an exception. To handle all the ways the specified name could be invalid, you must catch all four of these exceptions:

E_INVALIDARG
E_FAIL
ERROR_FILENAME_EXCED_RANGE
ERROR_INVALID_NAME

If the file is deleted before the rename finishes, this method throws the ERROR_FILE_NOT_FOUND exception. You must also catch and handle this exception when you use this method.

-examples

-see-also

RenameAsync(String, NameCollisionOption)