Contents - Index - Previous - Next


DefaultFileNameForSplitPart method

 

Applies to

TVCLUnZip component

 

Declaration

procedure DefaultFileNameForSplitPart(Sender: TObject; var FName: String; PartNum: Integer; SplitType: TSplitPartType);

 

Description

 

This procedure is called internally if you do not have an OnFileNameForSplitPart event defined. It will set the filenames to be used when creating each part of a blocked archive.  Below is a snapshot of the code used in this method at the time of this writing. See OnFileNameForSplitPart event for the filenaming schemes used by this method. 

 

procedure TVCLUnZip.DefaultFileNameForSplitPart(Sender: TObject; var FName: String; PartNum: Integer;

                SplitType: TSplitPartType);

begin

  if (BlockMode = bmStandard) then

  begin

    if (SplitType = spLast) then

      FName := Fname + '.zip.'

    else

      FName := FName + '.zip.' + Format('z%2.2d', [PartNum]);

  end

  else

      FName := FName + Format('%3.3d', [PartNum]);

end;