/// <summary> /// Stream constructor. /// </summary> /// <param name="stream">The stream that contains the DirectorySectorEntry data.</param> public DirectorySectorEntry(Stream stream) { Debug.Assert(stream.Length >= Constants.DIR_ENTRY_SIZE); BinaryReader reader = new BinaryReader(stream); _name = Reader.ReadSimpleUnicodeString(reader, 64); _nameLength = reader.ReadUInt16(); if (_nameLength > 0) { _nameLength /= 2; --_nameLength; _name = _name.Substring(0, _nameLength); } else { _name = ""; } _type = (Stgty)reader.ReadByte(); _color = (DeColor)reader.ReadByte(); _leftSibling = new Sid(reader.ReadUInt32()); _rightSibling = new Sid(reader.ReadUInt32()); _child = new Sid(reader.ReadUInt32()); _clsId = new Guid(reader.ReadBytes(16)); _userFlags = reader.ReadUInt32(); _createTimeStamp = reader.ReadUInt64(); _modifyTimeStamp = reader.ReadUInt64(); _sectStart = new Sect(reader.ReadUInt32()); _size = reader.ReadUInt32(); _propType = reader.ReadUInt16(); _padding = reader.ReadUInt16(); }
/* private ushort _padding; */ /// <summary> /// Stream constructor. /// </summary> /// <param name="stream">The stream that contains the DirectorySectorEntry data.</param> public DirectorySectorEntry(Stream stream) { Debug.Assert(stream.Length >= Constants.DIR_ENTRY_SIZE); BinaryReader reader = new BinaryReader(stream); _name = Reader.ReadSimpleUnicodeString(reader, 64); _nameLength = reader.ReadUInt16(); if(_nameLength > 0) { _nameLength /= 2; --_nameLength; _name = _name.Substring(0, _nameLength); } else _name = ""; _type = (Stgty)reader.ReadByte(); _color = (DeColor)reader.ReadByte(); _leftSibling = new Sid(reader.ReadUInt32()); _rightSibling = new Sid(reader.ReadUInt32()); _child = new Sid(reader.ReadUInt32()); _clsId = new Guid(reader.ReadBytes(16)); _userFlags = reader.ReadUInt32(); _createTimeStamp = reader.ReadUInt64(); _modifyTimeStamp = reader.ReadUInt64(); _sectStart = new Sect(reader.ReadUInt32()); _size = reader.ReadUInt32(); _propType = reader.ReadUInt16(); /* _padding = */ reader.ReadUInt16(); }
/// <summary> /// Constructor. /// </summary> /// <param name="name">The name of the entry.</param> /// <param name="type">The entry type.</param> public GenericDirectoryEntry(string name, Stgty type) : base(name) { _type = type; }
public XLSGenericDirectory(string name, Stgty type) : base(name) { Type = type; }