Use PCLStorage as its cross-platform and would work for iOS and Android:public async Task CreateRealFileAsync(){ // get hold of the file system IFolder rootFolder = FileSystem.Current.LocalStorage; // create a folder, if one does not exist already IFolder folder = await rootFolder.CreateFolderAsync("MySubFolder", CreationCollisionOption.OpenIfExists); // create a file, overwriting any existing file IFile file = await folder.CreateFileAsync("MyFile.txt", CreationCollisionOption.ReplaceExisting); // populate the file with some text await file.WriteAllTextAsync("Sample Text...");}这太广泛了,可能有几种解决方案,具体取决于您要实现的目标.this is too broad and could have several solutions depending on what exactly you want to achieve.希望这会有所帮助 这篇关于使用memorystream将文件保存到设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
07-25 04:48