Class Tar : first code review

From: Date: Wed, 08 Aug 2001 22:30:09 +0000
Subject: Class Tar : first code review
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-1326@lists.php.net to get a copy of this message
Hello, I send (attached) the first version of a tar class which can be usefull for PEAR project. It is an adaptation of a code I already wrote, so some methods may seems a bit complicated ... The basic sample is : $tar = new tar("archive.tar", "."); => Creates a tar file with name archive.tar and containing all the files of the current directory. $tar = new tar("archive.tar.gz", ".", true); => Same thing but the archive is compressed by gzip. To extract the archive : $tar = new tar("archive.tar"); $tar->extract(); => Extract the tar file in the current directory $tar->extract("temp/"); => Extract the tar file in the directory temp/ Other simple functions : $tar->create(); $tar->add("directory/"); $tar->listContent(); More complete functions : createModify(), addModify(), extractModify(), extractList() ToDo : - Update function - Remove function I'm waiting for your advices on the following points : - Coding Standard, - How to document the methods ? : Directly in the code (comments in a header before each method) ? - Where to put this class in the PEAR project, - Waiting for access to CVS (Stig ?) - anything you think can help me ... Thanks, Vincent

Attachment: [application/x-zip-compressed] Tar.zip
« previous php.pear.dev (#1326) next »