//This function is called when the DCLIST structure's nvflag is ExtractListEnum.ListContents. //It is used to list the zip file contents protected void UZReceiveDLLMessage (ulong ucsize, ulong csiz, ushort cfactor, ushort mo, ushort dy, ushort yr, ushort hh, ushort mm, byte c, [MarshalAs(UnmanagedType.LPStr)]String fname, [MarshalAs(UnmanagedType.LPStr)]String meth, uint crc, sbyte fCrypt) { //Add up the size of each file in the zip file m_ZipFileSize += ucsize; m_ZipFileCount ++; //NOTE: //Build out the ZipFileEntry collection //You can do additional formatting for the month, day, and year properties ZipFileEntry zfe = new ZipFileEntry(); zfe.FileName = Path.GetFileName(fname); zfe.FilePath = Path.GetDirectoryName(fname); zfe.IsFolder = (zfe.FileName.Length == 0 ? true : false); zfe.FileSize = unchecked(ucsize); zfe.FileMonth = mo; zfe.FileDay = dy; zfe.FileYear = yr; zfe.FileHour = hh; zfe.FileMinute = mm; zfe.CompressedSize = unchecked(csiz); zfe.CompressionFactor = cfactor; zfe.CompressionMethShort = meth; m_ZipFileEntries.Add(zfe); }
//the normal collections methods... public void Add(ZipFileEntry obj) { List.Add(obj); }