Author: Peter Keung Date: 2007-01-26 23:27:50 +0100 (Fri, 26 Jan 2007) New Revision: 4586
Log: Edited File eZ Component tutorial Modified: trunk/File/docs/tutorial.txt Modified: trunk/File/docs/tutorial.txt =================================================================== --- trunk/File/docs/tutorial.txt 2007-01-26 22:01:49 UTC (rev 4585) +++ trunk/File/docs/tutorial.txt 2007-01-26 22:27:50 UTC (rev 4586) @@ -1,4 +1,4 @@ -eZ components - File +eZ Components - File ~~~~~~~~~~~~~~~~~~~~ .. contents:: Table of Contents @@ -6,24 +6,20 @@ Introduction ============ -The File components currently contains one class that provides a few often used -filesystem operations that are missing from PHP. +The File component currently contains one class, providing a few handy +file system operations that are missing from PHP. Class overview ============== -This section gives you an overview on all classes, that are intended to be -used directly. +ezcFile is the only class in this component. It provides two static methods: +ezcFile::findRecursive() and ezcFile::removeRecursive(). -ezcFile - The only class in this component. It only provides two static methods: - ezcFile::findRecursive() and ezcFile::removeRecursive(). - Usage ===== -Finding Files Recursively +Finding files recursively ------------------------- This example shows how to use the ezcFile::findRecursive() method: @@ -31,17 +27,16 @@ .. include:: tutorial_example_01.php :literal: -The code in this example searched for files in the ``/dat/dev/ezcomponents`` -directory. It will only include files that match *all* patterns in the array -that you passed as the $includeFilters parameter. Files that match *any* of the -patterns in the array that you pass to $excludeFilters will not be returned -either. +The code in this example searches for files in the ``/dat/dev/ezcomponents`` +directory. It will only include files that match *all* patterns in the +$includeFilters array (the second parameter). Files that match *any* of the +patterns in the $excludeFilters array (the third parameter) will not be returned. -In other words the code above searches for files in the ``dat/dev/ezcomponents`` -directory, that are in the ``src/`` directory and end with ``_autoload.php``. -Except files that are in the ``/autoload/`` directory. +In other words, the code above searches for files in the ``dat/dev/ezcomponents`` +directory, which are in the ``src/`` directory and end with ``_autoload.php``, +except for files that are in the ``/autoload/`` directory. -Removing Directories Recursively +Removing directories recursively -------------------------------- This example shows how to use the ezcFile::removeRecursive() method: @@ -50,12 +45,12 @@ :literal: This code simply removes the directory ``/dat/dev/ezcomponents/trash`` and all -the files and directories in that directory. +of its files and sub-directories. **Warning: Use this function with care, as it has the potential to erase everything that the current user has access to.** -More Information +More information ================ For more information, see the ezcFile API documentation. -- svn-components mailing list svn-components@lists.ez.no http://lists.ez.no/mailman/listinfo/svn-components