从路径Win8.1创建一个StorageFile

本文关键字:一个 StorageFile 路径 Win8 创建 | 更新日期: 2023-09-27 18:12:37

我想从路径手动创建StorageFile,但是没有StorageFile的构造函数。

有简单的方法来做这样的事情吗?

StorageFile f = new StorageFile("C:'song.mp3");

从路径Win8.1创建一个StorageFile

StorageFile file = await StorageFile.GetFileFromPathAsync(item.Path);

您需要使用StorageFile。GetFileFromPathAsync API:

http://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.storagefile.getfilefrompathasync.aspx

相关文章: