Zipper icon indicating copy to clipboard operation
Zipper copied to clipboard

Change File name

Open AbuHamdah opened this issue 8 years ago • 2 comments

How i can change filename before adding them to zip file ? I tried ->add($file path , $new file name) But it not work How i can do that ?

AbuHamdah avatar Sep 11 '17 15:09 AbuHamdah

+1

DarkCobalt avatar Oct 03 '17 12:10 DarkCobalt

looks like you already can. see Zipper.php

/**
 * Add one or multiple files to the zip.
 *
 * @param $pathToAdd array|string An array or string of files and folders to add
 * @param null|mixed $fileName
 *
 * @return $this Zipper instance
 */

https://github.com/Chumper/Zipper/blob/2c942497e3980772d6c68b60e743d1ce1046a0e9/src/Chumper/Zipper/Zipper.php#L246

steven0123 avatar Feb 15 '18 05:02 steven0123