示例#1
0
        private void OnStat(IntPtr req)
        {
            var callback = _statCallback;
            _statCallback = null;

            callback.Invoke(this.FreeStatRequest(req), this.OnStat, this.DataStat);
        }
示例#2
0
        public void Stat(string path, Action<UvStatArgs> callback = null)
        {
            IntPtr req = IntPtr.Zero;

            try
            {
                req = this.CreateRequest();
                CheckError(Uvi.uv_fs_stat(this.Loop.Handle, req, path, _statDelegate));
                _statCallback = new UvStatCallback(this, callback);
            }
            catch (Exception)
            {
                this.FreeRequest(req);
                throw;
            }
        }