Advertisement
Guest User

Untitled

a guest
Apr 27th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. public void ApkWrite(byte[] buff,int ii)
  2. {
  3. string dirPath = "/sdcard/updateVersion/version";
  4. var filePath = Path.Combine(dirPath, "Game.apk");
  5. if (!Directory.Exists(dirPath))
  6. {
  7. Directory.CreateDirectory(dirPath);
  8. }
  9. else
  10. {
  11. if (File.Exists(filePath))
  12. {
  13. File.Delete(filePath);
  14. }
  15. }
  16. using (FileStream fos = new FileStream(filePath, FileMode.Create))
  17. {
  18. fos.Write(buff, 0, ii);
  19. }
  20. }
  21.  
  22. DependencyService.Get<IToken>().ApkWrite(buffer, totaltotal);
  23.  
  24. //void ApkWrite(byte[] buff, int ii);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement