TAR File Management With PHP Archive_Tar - ... And Packing Up
(Page 8 of 8 )
And that's about it for this tutorial. Over the last few pages, I took you on a whirlwind tour of the Archive_Tar class, one of the more useful items in PEAR's collection of filesystem tools. I showed you the basics of creating a TAR file, adding files to it, viewing its contents, and extracting it to a specific directory.
I also showed you a couple of more advanced tricks, including compressing the archive with either GZIP or BZIP2 compression and using built-in class methods to alter the directory structure of the files within the archive. Finally, I wrapped things up with two examples of how the Archive_Tar class could be used in real Web applications, by building a simple TAR file viewer and a file backup utility.
In case you'd like to read more about the topics discussed in this article, you should consider bookmarking the following sites:
The official Archive_Tar Web page, at http://pear.php.net/package-info.php?pacid=24
The PEAR Web site, at http://pear.php.net/
The GNU TAR pages, at http://www.gnu.org/software/tar/tar.html
The GZIP pages, at http://www.gzip.org/
The BZIP2 pages, at http://www.digistar.com/bzip2/
Until next time...happy archiving!
Note: Examples are illustrative only, and are not meant for a production environment. Melonfire provides no warranties or support for the source code described in this article. YMMV!
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |