从路径Win8.1创建StorageFile

时间:2014-07-13 15:19:08

标签: c# file windows-8.1

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

有没有一种简单的方法来做这样的事情?

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

2 个答案:

答案 0 :(得分:4)

答案 1 :(得分:3)

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