Xamarin File.WriteAllBytes the method does not write data

924 views Asked by At

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

1

There are 1 answers

1
maxipunchik On BEST ANSWER

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