StorageFile file = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///Assets/abc.txt"));
Stream stream1 = await file.OpenStreamForWriteAsync();
StreamWriter sr1 = new StreamWriter(stream1);
StreamReader运行良好。 它有一个例外
Access denied due to security concerns.
如何更正此代码? 提前谢谢。
答案 0 :(得分:3)
将文件存储在您具有写权限的位置。