public override unsafe void Write(byte[] buffer, int offset, int count) { byte[] buffer2; if (!this.CanWrite) { throw new NotImplementedException("Stream open for reading only"); } if (offset == 0) { buffer2 = buffer; } else { buffer2 = new byte[count]; Buffer.BlockCopy(buffer, offset, buffer2, 0, count); } int num = MobileDevice.AFCFileRefWrite(this.phone.AFCHandle, this.handle, buffer2, (uint)count); }
public override unsafe void Write(byte[] buffer, int offset, int count) { byte[] buffer2; if (_mode != OpenMode.Write) { throw new NotImplementedException("Stream open for reading only"); } if (offset == 0) { buffer2 = buffer; } else { buffer2 = new byte[count]; Buffer.BlockCopy(buffer, offset, buffer2, 0, count); } uint len = (uint)count; MobileDevice.AFCFileRefWrite(_phone.AFCHandle, _handle, buffer2, len); }