cvs: pear /Archive_Tar Tar.php

From: Date: Sat, 26 Jan 2002 00:15:48 +0000
Subject: cvs: pear /Archive_Tar Tar.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-2128@lists.php.net to get a copy of this message
vblavet Fri Jan 25 19:15:48 2002 EDT Modified files: /pear/Archive_Tar Tar.php Log: Adding commentaries Index: pear/Archive_Tar/Tar.php diff -u pear/Archive_Tar/Tar.php:1.15 pear/Archive_Tar/Tar.php:1.16 --- pear/Archive_Tar/Tar.php:1.15 Thu Jan 24 03:07:54 2002 +++ pear/Archive_Tar/Tar.php Fri Jan 25 19:15:47 2002 @@ -16,7 +16,7 @@ // | Authors: Vincent Blavet <vincent@blavet.net> | // +----------------------------------------------------------------------+ // -// $Id: Tar.php,v 1.15 2002/01/24 08:07:54 vblavet Exp $ +// $Id: Tar.php,v 1.16 2002/01/26 00:15:47 vblavet Exp $ require_once 'PEAR.php'; @@ -24,7 +24,7 @@ * Creates a (compressed) Tar archive * * @author Vincent Blavet <vincent@blavet.net> -* @version $Revision: 1.15 $ +* @version $Revision: 1.16 $ * @package Archive */ class Archive_Tar extends PEAR @@ -97,14 +97,15 @@ /** * This method creates the archive file and add the files / directories * that are listed in $p_filelist. - * If the file already exists and is writable, it is replaced by the - * new tar. It is a create and not an add. If the file exists and is - * read-only or is a directory it is not replaced. The method return - * false and a PEAR error text. + * If a file with the same name exist and is writable, it is replaced + * by the new tar. + * The method return false and a PEAR error text. * The $p_filelist parameter can be an array of string, each string * representing a filename or a directory name with their path if * needed. It can also be a single string with names separated by a * single blank. + * For each directory added in the archive, the files and + * sub-directories are also added. * See also createModify() method for more details. * * @param array $p_filelist An array of filenames and directory names, or a single @@ -120,6 +121,20 @@ // }}} // {{{ add() + /** + * This method add the files / directories that are listed in $p_filelist in + * the archive. If the archive does not exist it is created. + * The method return false and a PEAR error text. + * The files and directories listed are only added at the end of the archive, + * even if a file with the same name is already archived. + * See also createModify() method for more details. + * + * @param array $p_filelist An array of filenames and directory names, or a single + * string with names separated by a single blank space. + * @return true on success, false on error. + * @see createModify() + * @access public + */ function add($p_filelist) { return $this->addModify($p_filelist, '', '');

« previous php.pear.cvs (#2128) next »