在Windows Phone 8.1应用程序中创建和访问文件夹

时间:2016-01-29 04:28:50

标签: c# windows-phone-8.1 windows-phone directory

有些人可以帮助我在应用程序中创建和访问文件夹(在我们拥有资源的同一个地方,html文件夹)。我的要求是下载该文件夹中的文件,然后访问它。

我用过:

StorageFolder destinationFolder = await Package.Current.InstalledLocation.GetFolderAsync("Assets");
StorageFile localFile = await destinationFolder.CreateFileAsync(localFileName, CreationCollisionOption.ReplaceExisting);

当我检查它时显示路径为:Assets folder path: C:\Data\SharedData\PhoneTools\AppxLayouts\785bb4a5-5b27-4720-918e-7ceaeeb58c52VS.Debug..

1 个答案:

答案 0 :(得分:0)

如果您保存的文件不是直接用于终端用户,那么您应该使用App本地文件夹。如果您的数据量非常少,那么您也可以使用LocalSettings。有关更多可用存储选项和访问check this link的过程。