【发布时间】:2014-09-06 02:15:23
【问题描述】:
我正在编写一些代码以标准方式从 Windows 8 应用程序创建文件,代码如下所示:
using namespace Windows::Storage;
StorageFolder^ folder = KnownFolders::DocumentsLibrary;
String ^filename = ref new String(L"file.txt");
auto createFile = folder->CreateFileAsync(filename, CreationCollisionOption::ReplaceExisting);
concurrency::create_task(createFile).wait;
现在我不想使用DocumentsLibrary,而是想将这个文件写入自定义文件路径,例如:
C:\Users\<username>\AppData\Local\ExampleApp\ExampleFolder
我应该如何更改代码才能做到这一点?谢谢!
【问题讨论】:
标签: c++ windows-runtime windows-store-apps c++-cx