[C ++] [UWP] RenameAsync() [英] [C++][UWP] RenameAsync()

查看:94
本文介绍了[C ++] [UWP] RenameAsync()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用 

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()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆