System\IO\FileSystemWatcher.Linux.cs (13)
839Debug.Assert(_buffer != null);
840Debug.Assert(_buffer.Length > 0);
841Debug.Assert(_bufferAvailable >= 0 && _bufferAvailable <= _buffer.Length);
853fixed (byte* buf = &_buffer[0])
855_bufferAvailable = Interop.CheckIo(Interop.Sys.Read(_inotifyHandle, buf, this._buffer.Length));
856Debug.Assert(_bufferAvailable <= this._buffer.Length);
885readEvent.wd = BitConverter.ToInt32(_buffer, _bufferPos);
886readEvent.mask = BitConverter.ToUInt32(_buffer, _bufferPos + 4); // +4 to get past wd
887readEvent.cookie = BitConverter.ToUInt32(_buffer, _bufferPos + 8); // +8 to get past wd, mask
888int nameLength = (int)BitConverter.ToUInt32(_buffer, _bufferPos + 12); // +12 to get past wd, mask, cookie
907Debug.Assert(nameLength >= 0 && (position + nameLength) <= _buffer.Length);
909int lengthWithoutNullTerm = _buffer.AsSpan(position, nameLength).IndexOf((byte)'\0');
916Encoding.UTF8.GetString(_buffer, position, lengthWithoutNullTerm) :