/// <summary>
        ///     Writes to the <see cref="stream" />
        /// </summary>
        /// <param name="stream"></param>
        public void Write(Stream stream)
        {
            var streamRw = new StreamRW(stream);

            streamRw.Write(EntryName);
            streamRw.Write(NameLength);
            streamRw.Write((byte)StgType);
            streamRw.Write((byte)StgColor);
            streamRw.Write(LeftSibling);
            streamRw.Write(RightSibling);
            streamRw.Write(Child);
            streamRw.Write(StorageCLSID.ToByteArray());
            streamRw.Write(StateBits);
            streamRw.Write(CreationDate);
            streamRw.Write(ModifyDate);
            streamRw.Write(StartSector);
            streamRw.Write(Size);

            streamRw.Close();
        }
Esempio n. 2
0
        /// <summary>
        ///     Writes to the <see cref="stream" />
        /// </summary>
        /// <param name="stream"></param>
        public void Write(Stream stream)
        {
            var streamRw = new StreamRW(stream);

            streamRw.Write(HeaderSignature);
            streamRw.Write(CLSID);
            streamRw.Write(MinorVersion);
            streamRw.Write(MajorVersion);
            streamRw.Write(ByteOrder);
            streamRw.Write(SectorShift);
            streamRw.Write(MiniSectorShift);
            streamRw.Write(UnUsed);
            streamRw.Write(DirectorySectorsNumber);
            streamRw.Write(FATSectorsNumber);
            streamRw.Write(FirstDirectorySectorId);
            streamRw.Write(UnUsed2);
            streamRw.Write(MinSizeStandardStream);
            streamRw.Write(FirstMiniFATSectorId);
            streamRw.Write(MiniFATSectorsNumber);
            streamRw.Write(FirstDIFATSectorId);
            streamRw.Write(DIFATSectorsNumber);

            foreach (var i in DIFAT)
                streamRw.Write(i);

            if (MajorVersion == 4)
            {
                var zeroHead = new byte[3584];
                streamRw.Write(zeroHead);
            }

            streamRw.Close();
        }
Esempio n. 3
0
        /// <summary>
        ///     Writes to the <see cref="stream" />
        /// </summary>
        /// <param name="stream"></param>
        public void Write(Stream stream)
        {
            var streamRw = new StreamRW(stream);

            streamRw.Write(HeaderSignature);
            streamRw.Write(CLSID);
            streamRw.Write(MinorVersion);
            streamRw.Write(MajorVersion);
            streamRw.Write(ByteOrder);
            streamRw.Write(SectorShift);
            streamRw.Write(MiniSectorShift);
            streamRw.Write(UnUsed);
            streamRw.Write(DirectorySectorsNumber);
            streamRw.Write(FATSectorsNumber);
            streamRw.Write(FirstDirectorySectorId);
            streamRw.Write(UnUsed2);
            streamRw.Write(MinSizeStandardStream);
            streamRw.Write(FirstMiniFATSectorId);
            streamRw.Write(MiniFATSectorsNumber);
            streamRw.Write(FirstDIFATSectorId);
            streamRw.Write(DIFATSectorsNumber);

            foreach (var i in DIFAT)
            {
                streamRw.Write(i);
            }

            if (MajorVersion == 4)
            {
                var zeroHead = new byte[3584];
                streamRw.Write(zeroHead);
            }

            streamRw.Close();
        }