-api-id | -api-type |
---|---|
M:Windows.Storage.StorageFolder.RenameAsync(System.String) |
winrt method |
Renames the current folder.
The desired, new name for the current folder.
No object or value is returned by this method when it completes.
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.