RE: [PHP]Keep the modification date of a file when archiving it.
| From: | Boyd, Todd M. | Date: | Thu, 23 Oct 2008 13:37:09 +0000 |
| Subject: | RE: [PHP]Keep the modification date of a file when archiving it. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-282355@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Bastien Helders [mailto:eldros_kandar@hotmail.com]
> Sent: Thursday, October 23, 2008 4:26 AM
> To: php-general@lists.php.net
> Subject: [PHP]Keep the modification date of a file when archiving it.
>
>
> Hi,
>
> When I'm archiving files in a ZIP file, using the class ZipArchive,
the
> modification date is modified to when ZipArchive::close is called. I
> would like to keep the original modification date. Is that even
> possible?
www.php.net/touch
bool touch ( string $filename [, int $time [, int $atime ]] )
Attempts to set the access and modification times of the file named in
the filename parameter to the value given in time . Note that the access
time is always modified, regardless of the number of parameters.
If the file does not exist, it will be created.
--
So... I would say just call that on your file after you
ZipArchive::close it.
HTH,
Todd Boyd
Web Programmer