public bool MoveNext() { var result = files.MoveNext(); if (result) { var fi = new FileInfo(files.Current); Current = new ArchiveHeader { ArchiveName = archivename, FileAttributes = fi.Attributes, FileName = fi.Name, FileTime = fi.LastWriteTime, UnpackedSize = fi.Length, PackedSize = fi.Length, }; } else { Current = null; } return result; }
ArchiveResult ITotalCommanderWcxPlugin.ReadHeader(IntPtr archive, out ArchiveHeader header) { header = null; var result = ArchiveResult.Default; IArchiveUnpacker unpacker; lock (unpackers) { unpackers.TryGetValue(archive, out unpacker); } if (unpacker != null) { if (unpacker.MoveNext()) { header = unpacker.Current; result = ArchiveResult.Success; } else { result = ArchiveResult.EndArchive; } } return(result); }
ArchiveResult ITotalCommanderWcxPlugin.ReadHeader(IntPtr archive, out ArchiveHeader header) { header = null; var result = ArchiveResult.Default; IArchiveUnpacker unpacker; lock (unpackers) { unpackers.TryGetValue(archive, out unpacker); } if (unpacker != null) { if (unpacker.MoveNext()) { header = unpacker.Current; result = ArchiveResult.Success; } else { result = ArchiveResult.EndArchive; } } return result; }