I'm seeking a method which can add files from different locations into a compressed package(with some other path structrues), and create new directories in it (DO NOT create a real dir on the filesystem). Any good idea?
Asked
Active
Viewed 161 times
0
-
It must be zlib?? Or you can use zip files instead? Because the ZipArchive class have a method to add folders to the zip file: http://www.php.net/manual/en/function.ziparchive-addemptydir.php – elboletaire Dec 30 '11 at 04:21
-
but zlib seems to be the most common extension installed on PHP server. and i guess it would be portable if i use zlib. – Determinant Dec 30 '11 at 04:24
-
Sorry, can't help in this case.. I was looking for any way to do it.. but I only have two ways of doing this: decompress the contents to a temp folder and deflate it again... Or try to understand the RFC of the gz files and try to create a function to create folders.. this would be very cool, but if I must decide between my two options I'll sure opt for the first one (decompressing and compressing again). – elboletaire Dec 30 '11 at 04:44
-
zlib doesn't package files. It only compresses a single input stream / file. – mario Dec 30 '11 at 05:38
-
@mario thnx, i'll adjust the title. – Determinant Dec 30 '11 at 06:52