Author: dr
Date: Thu Oct  4 15:51:43 2007
New Revision: 6361

Log:
- Implemented ##11460: Changed tutorial related to File removal.

Added:
    trunk/Base/docs/tutorial_example_02.php
      - copied, changed from r6176, trunk/File/docs/tutorial_example_01.php
    trunk/Base/docs/tutorial_example_03.php
      - copied, changed from r6176, trunk/File/docs/tutorial_example_02.php
Removed:
    trunk/File/docs/tutorial_example_01.php
    trunk/File/docs/tutorial_example_02.php
Modified:
    trunk/Base/docs/tutorial.txt
    trunk/File/docs/tutorial.txt

Modified: trunk/Base/docs/tutorial.txt
==============================================================================
--- trunk/Base/docs/tutorial.txt [iso-8859-1] (original)
+++ trunk/Base/docs/tutorial.txt [iso-8859-1] Thu Oct  4 15:51:43 2007
@@ -163,6 +163,41 @@
 var_dump() in the following line shows, that the property value is set and
 contains the earlier set value (int) 42.
 
+File Operations
+---------------
+
+Finding files recursively
+`````````````````````````
+
+This example shows how to use the ezcBaseFile::findRecursive() method:
+
+.. include:: tutorial_example_02.php
+   :literal:
+
+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, which are in the ``src/`` directory and end with ``_autoload.php``,
+except for files that are in the ``/autoload/`` directory.
+
+Removing directories recursively
+````````````````````````````````
+
+This example shows how to use the ezcBaseFile::removeRecursive() method:
+
+.. include:: tutorial_example_03.php
+   :literal:
+
+This code simply removes the directory ``/dat/dev/ezcomponents/trash`` and all
+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.**
+
+
 
 ..
    Local Variables:

Copied: trunk/Base/docs/tutorial_example_02.php (from r6176, 
trunk/File/docs/tutorial_example_01.php)
==============================================================================
--- trunk/File/docs/tutorial_example_01.php [iso-8859-1] (original)
+++ trunk/Base/docs/tutorial_example_02.php [iso-8859-1] Thu Oct  4 15:51:43 
2007
@@ -1,7 +1,7 @@
 <?php
 require 'tutorial_autoload.php';
 
-$data = ezcFile::findRecursive(
+$data = ezcBaseFile::findRecursive(
        "/dat/dev/ezcomponents",
        array( '@src/.*_autoload.php$@' ),
        array( '@/autoload/@' )

Copied: trunk/Base/docs/tutorial_example_03.php (from r6176, 
trunk/File/docs/tutorial_example_02.php)
==============================================================================
--- trunk/File/docs/tutorial_example_02.php [iso-8859-1] (original)
+++ trunk/Base/docs/tutorial_example_03.php [iso-8859-1] Thu Oct  4 15:51:43 
2007
@@ -1,6 +1,6 @@
 <?php
 require 'tutorial_autoload.php';
 
-ezcFile::removeRecursive( '/dat/dev/ezcomponents/trash' );
+ezcBaseFile::removeRecursive( '/dat/dev/ezcomponents/trash' );
 
 ?>

Modified: trunk/File/docs/tutorial.txt
==============================================================================
--- trunk/File/docs/tutorial.txt [iso-8859-1] (original)
+++ trunk/File/docs/tutorial.txt [iso-8859-1] Thu Oct  4 15:51:43 2007
@@ -6,54 +6,17 @@
 Introduction
 ============
 
-The File component currently contains one class, providing a few handy
-file system operations that are missing from PHP.
+The File component is now **deprecated**. Instead use the ezcBaseFile class
+from the Base package. Please refer to the Base_ component introduction
+for the tutorial. The classes in this component still exist because
+of backwards compatibility reasons.
 
-Class overview
-==============
-
-ezcFile is the only class in this component. It provides two static methods:
-ezcFile::findRecursive() and ezcFile::removeRecursive().
-
-
-Usage
-=====
-
-Finding files recursively
--------------------------
-
-This example shows how to use the ezcFile::findRecursive() method:
-
-.. include:: tutorial_example_01.php
-   :literal:
-
-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, which are in the ``src/`` directory and end with ``_autoload.php``,
-except for files that are in the ``/autoload/`` directory.
-
-Removing directories recursively
---------------------------------
-
-This example shows how to use the ezcFile::removeRecursive() method:
-
-.. include:: tutorial_example_02.php
-   :literal:
-
-This code simply removes the directory ``/dat/dev/ezcomponents/trash`` and all
-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.**
+.. _Base: introduction_Base.html
 
 More information
 ================
 
-For more information, see the ezcFile API documentation.
+For more information, see the ezcBaseFile API documentation.
 
 
 ..


-- 
svn-components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/svn-components

Reply via email to