System\IO\FileSystemWatcher.Linux.cs (13)
850Debug.Assert(_buffer != null);
851Debug.Assert(_buffer.Length > 0);
852Debug.Assert(_bufferAvailable >= 0 && _bufferAvailable <= _buffer.Length);
864fixed (byte* buf = &_buffer[0])
866_bufferAvailable = Interop.CheckIo(Interop.Sys.Read(_inotifyHandle, buf, this._buffer.Length));
867Debug.Assert(_bufferAvailable <= this._buffer.Length);
896readEvent.wd = BitConverter.ToInt32(_buffer, _bufferPos);
897readEvent.mask = BitConverter.ToUInt32(_buffer, _bufferPos + 4); // +4 to get past wd
898readEvent.cookie = BitConverter.ToUInt32(_buffer, _bufferPos + 8); // +8 to get past wd, mask
899int nameLength = (int)BitConverter.ToUInt32(_buffer, _bufferPos + 12); // +12 to get past wd, mask, cookie
918Debug.Assert(nameLength >= 0 && (position + nameLength) <= _buffer.Length);
920int lengthWithoutNullTerm = _buffer.AsSpan(position, nameLength).IndexOf((byte)'\0');
927Encoding.UTF8.GetString(_buffer, position, lengthWithoutNullTerm) :