unsafe public void Stat(Loop loop, Action <Exception> callback) { var fsr = new FileSystemRequest(); fsr.Callback = (ex, fsr2) => { lin_stat stats = new lin_stat(); uv_fs_req_stat(fsr.Handle, &stats); Console.WriteLine(stats); callback(ex); }; int r = uv_fs_fstat(loop.Handle, fsr.Handle, FileHandle, FileSystemRequest.StaticEnd); Ensure.Success(r, loop); }
private static unsafe extern void uv_fs_req_stat(IntPtr req, lin_stat *stat);
public unsafe void Stat(Loop loop, Action<Exception> callback) { var fsr = new FileSystemRequest(); fsr.Callback = (ex, fsr2) => { lin_stat stats = new lin_stat(); uv_fs_req_stat(fsr.Handle, &stats); Console.WriteLine (stats); callback(ex); }; int r = uv_fs_fstat(loop.Handle, fsr.Handle, FileHandle, FileSystemRequest.StaticEnd); Ensure.Success(r, loop); }