cvs: pear /Archive_Tar Tar.php

From: Date: Mon, 20 May 2002 11:39:12 +0000
Subject: cvs: pear /Archive_Tar Tar.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-3972@lists.php.net to get a copy of this message
ssb Mon May 20 07:39:12 2002 EDT Modified files: /pear/Archive_Tar Tar.php Log: * started adding docs Index: pear/Archive_Tar/Tar.php diff -u pear/Archive_Tar/Tar.php:1.20 pear/Archive_Tar/Tar.php:1.21 --- pear/Archive_Tar/Tar.php:1.20 Thu May 9 08:57:44 2002 +++ pear/Archive_Tar/Tar.php Mon May 20 07:39:12 2002 @@ -16,7 +16,7 @@ // | Author: Vincent Blavet <vincent@blavet.net> | // +----------------------------------------------------------------------+ // -// $Id: Tar.php,v 1.20 2002/05/09 12:57:44 vblavet Exp $ +// $Id: Tar.php,v 1.21 2002/05/20 11:39:12 ssb Exp $ require_once 'PEAR.php'; @@ -24,7 +24,7 @@ * Creates a (compressed) Tar archive * * @author Vincent Blavet <vincent@blavet.net> -* @version $Revision: 1.20 $ +* @version $Revision: 1.21 $ * @package Archive */ class Archive_Tar extends PEAR @@ -1073,6 +1073,15 @@ // }}} // {{{ _dirCheck() + + /** + * Check if a directory exists and create it (including parent + * dirs) if not. + * + * @param string $p_dir directory to check + * + * @return bool TRUE if the directory exists or was created + */ function _dirCheck($p_dir) { if ((@is_dir($p_dir)) || ($p_dir == '')) @@ -1092,9 +1101,22 @@ return true; } + // }}} // {{{ _pathReduction() + + /** + * Compress path by changing for example "/dir/foo/../bar" to "/dir/bar", and + * remove double slashes. + * + * @param string $p_dir path to reduce + * + * @return string reduced path + * + * @access private + * + */ function _pathReduction($p_dir) { $v_result = ''; @@ -1126,6 +1148,7 @@ $v_result = strtr($v_result, '\\', '/'); return $v_result; } + // }}} // {{{ _translateWinPath()

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