Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

FileStream does not exist add reference in xamarin form // FileSystem.Current.GetFileFromPathAsync

$
0
0

using (var httpClient = new HttpClient())
{
using (var request = new HttpRequestMessage(HttpMethod.Get,new Uri("http://preprod.quickappsbuilder.com/api/apps/getapp2")))
{
using (Stream contentStream = await (await httpClient.SendAsync(request)).Content.ReadAsStreamAsync(),
stream = new FileStream(filename, FileMode.Create, FileAccess.Write, FileShare.None, 2048, true))
{
IFile file = await FileSystem.Current.GetFileFromPathAsync(fs.filepath);
byte[] buffer = new byte[100];
using (System.IO.Stream stream1 = await file.OpenAsync(FileAccess.ReadAndWrite))
{
stream1.Write(buffer, 0, 100);
}
await contentStream.CopyToAsync(stream);
}
}
}


Viewing all articles
Browse latest Browse all 89864

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>