예제 #1
0
        private static int WriteMember(BuildDirectoryMember m, string nameOverride, Encoding nameEnc, byte[] buffer, int offset, Dictionary <BuildDirectoryMember, uint> locationTable, Encoding dataEnc)
        {
            DirectoryRecord dr = new DirectoryRecord();

            dr.FileIdentifier       = m.PickName(nameOverride, nameEnc);
            dr.LocationOfExtent     = locationTable[m];
            dr.DataLength           = (uint)m.GetDataSize(dataEnc);
            dr.RecordingDateAndTime = m.CreationTime;
            dr.Flags = (m is BuildDirectoryInfo) ? FileFlags.Directory : FileFlags.None;
            return(dr.WriteTo(buffer, offset, nameEnc));
        }
예제 #2
0
 internal void Add(BuildDirectoryMember member)
 {
     _members.Add(member.Name, member);
     _sortedMembers = null;
 }
예제 #3
0
 /// <summary>
 /// Gets the specified child directory or file.
 /// </summary>
 /// <param name="name">The name of the file or directory to get.</param>
 /// <param name="member">The member found (or <c>null</c>).</param>
 /// <returns><c>true</c> if the specified member was found.</returns>
 internal bool TryGetMember(string name, out BuildDirectoryMember member)
 {
     return(_members.TryGetValue(name, out member));
 }