cvs: php4 /pear/Experimental System.php
| From: | Alexander Merz | Date: | Fri, 12 Oct 2001 10:40:26 +0000 |
| Subject: | cvs: php4 /pear/Experimental System.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-986@lists.php.net to get a copy of this message | ||
alexmerz Fri Oct 12 06:40:26 2001 EDT
Modified files:
/php4/pear/Experimental System.php
Log:
fix phpdoc
Index: php4/pear/Experimental/System.php
diff -u php4/pear/Experimental/System.php:1.4 php4/pear/Experimental/System.php:1.5
--- php4/pear/Experimental/System.php:1.4 Thu Oct 11 06:46:44 2001
+++ php4/pear/Experimental/System.php Fri Oct 12 06:40:26 2001
@@ -17,7 +17,7 @@
// | |
// +----------------------------------------------------------------------+
//
-// $Id: System.php,v 1.4 2001/10/11 10:46:44 cox Exp $
+// $Id: System.php,v 1.5 2001/10/12 10:40:26 alexmerz Exp $
//
// TODO:
@@ -30,6 +30,8 @@
require_once 'Console/Getopt.php';
/**
+* System offers cross plattform compatible system functions
+*
* Static functions for different operations. Should work under
* Unix and Windows. The names and usage has been taken from its repectively
* GNU commands.
@@ -37,10 +39,23 @@
* Usage: System::rm('-r file1 dir1');
*
* ------------------- EXPERIMENTAL STATUS -------------------
+*
+* @package System
+* @author Tomas V.V.Cox <cox@idecnet.com>
+* @version $Version$
+* @access public
*/
class System extends PEAR
{
-
+ /**
+ * returns the commandline arguments of a function
+ *
+ * @param string $argv the commandline
+ * @param string $short_options the allowed option short-tags
+ * @param string $long_options the allowed option long-tags
+ * @return array the given options and there values
+ * @access private
+ */
function _parseArgs($argv, $short_options, $long_options = null)
{
if (!is_array($argv)) {
@@ -51,6 +66,8 @@
}
/**
+ * Creates a nested array representing the structure of a directory
+ *
* System::_dirToStruct('dir1', 0) =>
* Array
* (
@@ -65,6 +82,11 @@
* [1] => dir1/file3
* )
* )
+ * @param string $sPath Name of the directory
+ * @param integer $maxinst max. deep of the lookup
+ * @param integer $aktinst starting deep of the lookup
+ * @return array the structure of the dir
+ * @access private
*/
function _dirToStruct($sPath, $maxinst, $aktinst = 0)
@@ -97,9 +119,10 @@
}
/**
+ * Creates a nested array representing the structure of a directory and files
*
- * @param array $files Array listing files and dirs
- * @return array
+ * @param array $files Array listing files and dirs
+ * @return array
* @see System::_dirToStruct()
*/
function _multipleToStruct($files)
@@ -117,9 +140,12 @@
}
/**
- * The rm command for removing files. Supports multiple files and dirs
- * and also recursive deletes
+ * The rm command for removing files.
+ * Supports multiple files and dirs and also recursive deletes
*
+ * @param string $args the arguments for rm
+ * @return mixed PEAR_Error or true for success
+ * @access public
*/
function rm($args)
{
@@ -155,6 +181,9 @@
/**
* Make directories
*
+ * @param string $args the name of the director(y|ies) to create
+ * @return mixed PEAR_Error or true for success
+ * @access public
*/
function mkDir($args)
{
@@ -202,6 +231,10 @@
* 3) System::cat('sample.txt test.txt >> final.txt');
*
* Note: as the class use fopen, urls should work also (test that)
+ *
+ * @param string $args the arguments
+ * @return boolean true on success
+ * @access public
*/
function &cat($args)
{