문제

I'm developing a metro app that uses file input and output. The code I used to save the file is

StorageFolder appfolder = await Windows.Storage.KnownFolders.DocumentsLibrary.CreateFolderAsync("Appdata.abc", Windows.Storage.CreationCollisionOption.ReplaceExisting);
StorageFile file = await Windows.Storage.KnownFolders.DocumentsLibrary.CreateFileAsync(DateFileName + ".uvraj", Windows.Storage.CreationCollisionOption.ReplaceExisting);

Now how can I create/save my file inside the folder I created??

도움이 되었습니까?

해결책

Call the method on the appfolder object, instead of the KnownFolder you're using.

Like this:

StorageFolder appfolder = await Windows.Storage.KnownFolders.DocumentsLibrary.CreateFolderAsync("Appdata.abc", Windows.Storage.CreationCollisionOption.ReplaceExisting);
StorageFile file = await appfolder.CreateFileAsync(DateFileName + ".uvraj", Windows.Storage.CreationCollisionOption.ReplaceExisting);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top