io
Packages
Interfaces
Classes
Files

Class: Folder

Source Location: /io/filesystem/folder.class.php [line 37]

Class Overview

FileSystemElement
   |
   --Folder
This class allows you to handle very easily a folder on the serveur.

Author(s):



Class Details

This class allows you to handle very easily a folder on the serveur.

Tags:

[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]


Class Methods

constructor Folder [line 44]

Folder Folder( string $path, [bool $whenopen = OPEN_AFTER])
Builds a Folder object.

Parameters:

string   $path   Path of the folder.
bool   $whenopen   OPEN_AFTER if you want to synchronyse you with the folder only when it's necessary or OPEN_NOW if you want to open it now.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method delete [line 190]

True delete( )
Deletes the folder and all what it contains.

Tags:

  • return: if deleted successfully.
Overrides FileSystemElement::delete() (Deletes the element)
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_all_content [line 181]

FileSystemElement[] get_all_content( )
Returns all the file system elements contained by the folder.

Tags:

  • return: The list of the file system element contained in this folder.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_files [line 103]

File[] get_files( [string $regex = ''])
Lists the files contained in this folder.

Tags:

  • return: The files list.

Parameters:

string   $regex   PREG which describes the pattern the files you want to list must match. If you want all of them, don't use this parameter.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_first_folder [line 163]

Folder get_first_folder( )
Returns the first folder present in this folder

Tags:

  • return: The first folder of this folder or null if it doesn't contain any folder.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_folders [line 133]

Folder[] get_folders( [string $regex = ''])
Lists the folders contained in this folder.

Tags:

  • return: The folders list.

Parameters:

string   $regex   PREG which describes the pattern the folders you want to list must match. If you want all of them, don't use this parameter.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method open [line 71]

void open( )
Opens the folder.
Overrides FileSystemElement::open() (Opens the file system element.)
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]


Class Variables

[line 212]   File[]  $files  = array()

Tags:

    [ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
    [line 217]   Folder[]  $folders  = array()

    Tags:

      [ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

      Inherited Methods

      Class: FileSystemElement

      FileSystemElement::FileSystemElement()
      Builds a FileSystemElement object from the path of the element.
      FileSystemElement::change_chmod()
      Changes the chmod of the element.
      FileSystemElement::delete()
      Deletes the element
      FileSystemElement::exists()
      Allows you to know if the file system element exists.
      FileSystemElement::get()
      Initializes the file system element just before to be read.
      FileSystemElement::get_name()
      Returns the element name.
      FileSystemElement::open()
      Opens the file system element.
      FileSystemElement::write()
      Does the necessary treatment to apply at each writing operation


      Documentation generated on Tue, 28 Jul 2009 22:43:37 +0200 by phpDocumentor 1.4.1