问题描述
我目前正在使用
I'm currently using
RenameAsync (Platform :: String desiredName,NameCollisionOption选项)
如果使用了 NameCollisionOption,我该怎么判断?
我正在使用标志" GenerateUniqueName"但我不知道这是否被调用!!函数 RenameAsync()不返回任何内容。那么我应该如何使用这个新的唯一名称更新我的UI?
I'm using the flag "GenerateUniqueName" but I have no idea if this was invoked!! The function RenameAsync() doesn't return anything. So how am I supposed to update my UI with this new unique name?
推荐答案
您是否在IStorageItem界面上使用RenameAsync?执行RenameAsync后,您将能够使用item.Path属性获取新路径。有关详细信息,请参阅https://docs.microsoft.com/en-us/uwp/api/windows.storage.istorageitem。
Are you using RenameAsync off IStorageItem interface? After the RenameAsync executed, you shall be able to fetch the new path by using item.Path property. Refer https://docs.microsoft.com/en-us/uwp/api/windows.storage.istorageitem for details.
这篇关于[C ++] [UWP] RenameAsync()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!