Rename File in IsolatedStorage

前端 未结 3 1850
闹比i
闹比i 2021-01-05 03:32

I need to rename a file in the IsolatedStorage. How can I do that?

3条回答
  •  無奈伤痛
    2021-01-05 03:57

    Perfectly execute this piece of code

    string oldName="oldName";
    string newName="newName";
    var file = await ApplicationData.Current.LocalFolder.GetFileAsync(oldName);
    await file.RenameAsync(newName);
    

提交回复
热议问题