Exemplo n.º 1
0
 // Token: 0x06000080 RID: 128 RVA: 0x00005644 File Offset: 0x00003844
 public override long Seek(long offset, SeekOrigin origin)
 {
     lock (this.phone)
     {
         MobileDeviceBase.AFCFileRefSeek(this.phone.AFCHandle, this.handle, (long)((ulong)((uint)offset)), 0L);
     }
     return(offset);
 }
Exemplo n.º 2
0
        // Token: 0x0600007E RID: 126 RVA: 0x00005514 File Offset: 0x00003714
        public override int Read(byte[] buffer, int offset, int count)
        {
            if (!this.CanRead)
            {
                throw new NotImplementedException("Stream open for writing only");
            }
            int result;

            lock (this.phone)
            {
                if (offset != 0)
                {
                    MobileDeviceBase.AFCFileRefSeek(this.phone.AFCHandle, this.handle, (long)offset, 0L);
                }
                uint num = (uint)count;
                if (MobileDeviceBase.AFCFileRefRead(this.phone.AFCHandle, this.handle, buffer, ref num) != 0)
                {
                    throw new IOException("AFCFileRefRead error..");
                }
                result = (int)num;
            }
            return(result);
        }