Beispiel #1
0
        /// <summary>
        /// Unless this file is <see cref="AbstractFsObject.IsReadOnly"/>, this method also
        /// updates the "last accessed" field in the directory entry that is
        /// associated with this file.
        /// </summary>
        /// <param name="offset"></param>
        /// <param name="dest"></param>
        /// <seealso cref="FatDirectoryEntry.SetLastAccessed(long)"/>
        public void Read(long offset, MemoryStream dest)
        {
            CheckValid();

            var len = (int)(dest.Length - dest.Position);

            if (len == 0)
            {
                return;
            }

            if (offset + len > GetLength())
            {
                throw new EndOfStreamException();
            }

            if (!IsReadOnly())
            {
                UpdateTimeStamps(false);
            }

            chain.ReadData(offset, dest);
        }
Beispiel #2
0
 protected override void Read(MemoryStream data)
 {
     Chain.ReadData(0, data);
 }