FileInformation.RenameAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
RenameAsync(String) |
Renames the StorageFile. |
RenameAsync(String, NameCollisionOption) |
Renames the StorageFile, and specifies what to do if a file with the same name already exists in the current folder. |
RenameAsync(String)
Renames the StorageFile.
public:
virtual IAsyncAction ^ RenameAsync(Platform::String ^ desiredName) = RenameAsync;
/// [Windows.Foundation.Metadata.Overload("RenameAsyncOverloadDefaultOptions")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncAction RenameAsync(winrt::hstring const& desiredName);
[Windows.Foundation.Metadata.Overload("RenameAsyncOverloadDefaultOptions")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncAction RenameAsync(string desiredName);
function renameAsync(desiredName)
Public Function RenameAsync (desiredName As String) As IAsyncAction
Parameters
- desiredName
-
String
Platform::String
winrt::hstring
The new name.
Returns
No object or value is returned when this method completes.
Implements
- Attributes
See also
Applies to
RenameAsync(String, NameCollisionOption)
Renames the StorageFile, and specifies what to do if a file with the same name already exists in the current folder.
public:
virtual IAsyncAction ^ RenameAsync(Platform::String ^ desiredName, NameCollisionOption option) = RenameAsync;
/// [Windows.Foundation.Metadata.Overload("RenameAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncAction RenameAsync(winrt::hstring const& desiredName, NameCollisionOption const& option);
[Windows.Foundation.Metadata.Overload("RenameAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncAction RenameAsync(string desiredName, NameCollisionOption option);
function renameAsync(desiredName, option)
Public Function RenameAsync (desiredName As String, option As NameCollisionOption) As IAsyncAction
Parameters
- desiredName
-
String
Platform::String
winrt::hstring
The new name.
- option
- NameCollisionOption
A value that indicates what to do if the file name already exists in the current folder.
Returns
No object or value is returned when this method completes.
Implements
- Attributes