[fpc-pascal] Porting code from Windows D2007, missing Windows functions

wkitty42 at windstream.net wkitty42 at windstream.net
Thu Jul 14 15:25:56 CEST 2016


On 07/14/2016 08:31 AM, Bo Berglund wrote:
[...]
> But this line:
> OurZipper.Entries.AddFileEntry(ParamStr(I), ParamStr(I));
>
> seems to add the files to zip into some kind of internal list.
> Why does it take the same argument twice?

i found the following in the interface section of zipper.pp

   TZipFileEntries = Class(TCollection)
   private
     function GetZ(AIndex : Integer): TZipFileEntry;
     procedure SetZ(AIndex : Integer; const AValue: TZipFileEntry);
   Public
     Function AddFileEntry(Const ADiskFileName : String): TZipFileEntry;
     Function AddFileEntry(Const ADiskFileName, AArchiveFileName : String): 
TZipFileEntry;
     Function AddFileEntry(Const AStream : TSTream; Const AArchiveFileName : 
String): TZipFileEntry;
     Procedure AddFileEntries(Const List : TStrings);
     Property Entries[AIndex : Integer] : TZipFileEntry Read GetZ Write SetZ; 
default;
   end;


looks to me like you can zip a disk file or a stream... inside the archive, it 
appears that each file can have a name... makes sense to use the disk file name 
as the internal file name... also gives a way for a stream to have a name once 
archived into the zip...


-- 
  NOTE: No off-list assistance is given without prior approval.
        *Please keep mailing list traffic on the list* unless
        private contact is specifically requested and granted.



More information about the fpc-pascal mailing list