Library.Io.UnbufferedFileStream.Close C# (CSharp) Method

Close() public method

public Close ( ) : void
return void
        public override void Close()
        {
            if (_disposed) return;

            this.Flush();
            base.Close();

            try
            {
                using (var stream = new FileStream(_path, FileMode.Open))
                {
                    if (stream.Length != _length)
                    {
                        stream.SetLength(_length);
                    }
                }
            }
            catch (Exception)
            {

            }
        }