Ejemplo n.º 1
0
 public static void Compute(Loop loop, string file)
 {
     var @in = new UVFileStream(loop);
     @in.Open(file, UVFileAccess.Read, (ex) => {
         HashStream.ComputeString(SHA1Managed.Create(), @in, (str) => {
             Console.WriteLine ("{0} {1}", str, file);
         });
         @in.Resume();
     });
 }
Ejemplo n.º 2
0
 public static Task OpenAsync(this UVFileStream filestream, string path, UVFileAccess access)
 {
     return(HelperFunctions.Wrap(path, access, filestream.Open));
 }
Ejemplo n.º 3
0
	public static async Task<byte[]> Compute(string file)
	{
		var stream = new UVFileStream();
		await stream.OpenReadAsync(file);
		return await Compute(stream);
	}
Ejemplo n.º 4
0
 public static Task OpenWriteAsync(this UVFileStream fileStream, string path)
 {
     return(HelperFunctions.Wrap(path, fileStream.OpenWrite));
 }