【发布时间】:2013-07-22 17:25:41
【问题描述】:
我需要一种将文件下载到桌面的方法。
根据我的研究,我找到了将文件保存到特定于应用程序的目录的方法,即(LocalFolder、RoamingFolder、TemporaryFolder)、DownloadsFolder和KnownFolders 即(DocumentsLibrary、PictureLibrary、MusicLibrary、VideoLibrary 和 RemovableDevices)。
C# 提供了一种获取桌面路径和创建文件的方法
var desktopFolder = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);
var fullFileName = Path.Combine(desktopFolder, "Test.txt");
var fs = new FileStream(fullFileName, FileMode.Create);
但在类Environment
中不存在SpecialFolder或GetFolderPath所以我的问题 -
是否可以使用 windows 商店应用程序将文件保存到桌面?如果可能的话,请让我 知道吗?
【问题讨论】:
标签: windows-store-apps windows-store