简体   繁体   中英

Xamarin File.WriteAllBytes the method does not write data

Here is my code:

string f = GetRefInfoServise.GetRefInfo("GA");
byte[] data = System.Convert.FromBase64String(f);

var backingFile = 
   Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "arch.zip");

File.WriteAllBytes(backingFile, data);` 

The method does not return an exception, but the file is not written. I'm trying to do this on Android API 28

It works. I just didn't know about the internal storage. It is hidden from the user, so I couldn't find my file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM