RecursiveDirectoryIterator Class Reference
[Internal classes]

recursive directory iterator More...

Inheritance diagram for RecursiveDirectoryIterator:

Inheritance graph
{DirectoryIterator\n||+ __construct()\l+ __toString()\l+ current()\l+ isDot()\l+ isLink()\l+ key()\l+ next()\l+ rewind()\l+ valid()\l}{SplFileInfo\n||+ __construct()\l+ __toString()\l+ getATime()\l+ getCTime()\l+ getFileInfo()\l+ getFilename()\l+ getGroup()\l+ getInode()\l+ getLinkTarget()\l+ getMTime()\l+ getOwner()\l+ getPath()\l+ getPathInfo()\l+ getPathname()\l+ getPerms()\l+ getRealPath()\l+ getSize()\l+ getType()\l+ isDir()\l+ isExecutable()\l+ isFile()\l+ isLink()\l+ isReadable()\l+ isWritable()\l+ openFile()\l+ setFileClass()\l+ setInfoClass()\l}{Iterator\n||+ current()\l+ key()\l+ next()\l+ rewind()\l+ valid()\l}{RecursiveIterator\n||+ getChildren()\l+ hasChildren()\l}{Traversable\n||}
[legend]
Collaboration diagram for RecursiveDirectoryIterator:

Collaboration graph
{DirectoryIterator\n||+ __construct()\l+ __toString()\l+ current()\l+ isDot()\l+ isLink()\l+ key()\l+ next()\l+ rewind()\l+ valid()\l}{SplFileInfo\n||+ __construct()\l+ __toString()\l+ getATime()\l+ getCTime()\l+ getFileInfo()\l+ getFilename()\l+ getGroup()\l+ getInode()\l+ getLinkTarget()\l+ getMTime()\l+ getOwner()\l+ getPath()\l+ getPathInfo()\l+ getPathname()\l+ getPerms()\l+ getRealPath()\l+ getSize()\l+ getType()\l+ isDir()\l+ isExecutable()\l+ isFile()\l+ isLink()\l+ isReadable()\l+ isWritable()\l+ openFile()\l+ setFileClass()\l+ setInfoClass()\l}{Iterator\n||+ current()\l+ key()\l+ next()\l+ rewind()\l+ valid()\l}{RecursiveIterator\n||+ getChildren()\l+ hasChildren()\l}{Traversable\n||}
[legend]
List of all members.

Public Member Functions

 __construct ($path, $flags=0)
 __toString ()
 current ()
 getATime ()
 getChildren ()
 getCTime ()
 getFileInfo (string class_name=NULL)
 getFilename ()
 getGroup ()
 getInode ()
 getLinkTarget ()
 getMTime ()
 getOwner ()
 getPath ()
 getPathInfo (string class_name=NULL)
 getPathname ()
 getPerms ()
 getRealPath ()
 getSize ()
 getSubPath ()
 getSubPathname ()
 getType ()
 hasChildren ()
 isDir ()
 isDot ()
 isExecutable ()
 isFile ()
 isLink ()
 isReadable ()
 isWritable ()
 key ()
 next ()
 openFile ($mode= 'r', $use_include_path=false, $context=NULL)
 rewind ()
 setFileClass (string class_name="SplFileObject")
 setInfoClass (string class_name="SplFileInfo")
 valid ()

Public Attributes

const CURRENT_AS_FILEINFO x00000010
const KEY_AS_FILENAME x00000020
const NEW_CURRENT_AND_KEY x00000030

Detailed Description

recursive directory iterator

Version:
1.1
Since:
PHP 5.0

Definition at line 1020 of file spl.php.


Constructor & Destructor Documentation

RecursiveDirectoryIterator::__construct ( path,
flags = 0 
)

Construct a directory iterator from a path-string.

Parameters:
$path directory to iterate.
$flags open flags
  • CURRENT_AS_FILEINFO
  • KEY_AS_FILENAME
  • NEW_CURRENT_AND_KEY

Definition at line 1034 of file spl.php.

01034 {}


Member Function Documentation

DirectoryIterator::__toString (  )  [inherited]

Returns:
getFilename()

Reimplemented from SplFileInfo.

Definition at line 1012 of file spl.php.

01012 {}

RecursiveDirectoryIterator::current (  ) 

Returns:
getFilename() or getFileInfo() depending on flags

Reimplemented from DirectoryIterator.

Definition at line 1042 of file spl.php.

01042 {}

SplFileInfo::getATime (  )  [inherited]

Returns:
The current entry's last access time.

Definition at line 896 of file spl.php.

00896 {}

RecursiveDirectoryIterator::getChildren (  ) 

Returns:
a RecursiveDirectoryIterator for the current entry.

Implements RecursiveIterator.

Definition at line 1050 of file spl.php.

01050 {}  

SplFileInfo::getCTime (  )  [inherited]

Returns:
The current entry's last change time.

Definition at line 904 of file spl.php.

00904 {}

SplFileInfo::getFileInfo ( string  class_name = NULL  )  [inherited]

Returns:
SplFileInfo created for the file

Parameters:
class_name name of class to instantiate
See also:
SplFileInfo::setInfoClass()

Definition at line 862 of file spl.php.

00862 {}

SplFileInfo::getFilename (  )  [inherited]

Returns:
the filename only.

Definition at line 856 of file spl.php.

00856 {}  

SplFileInfo::getGroup (  )  [inherited]

Returns:
The current entry's group name.

Definition at line 892 of file spl.php.

00892 {}

SplFileInfo::getInode (  )  [inherited]

Returns:
The current entry's inode.

Definition at line 880 of file spl.php.

00880 {}

SplFileInfo::getLinkTarget (  )  [inherited]

Returns:
target of link.

Definition at line 936 of file spl.php.

00936 {}

SplFileInfo::getMTime (  )  [inherited]

Returns:
The current entry's last modification time.

Definition at line 900 of file spl.php.

00900 {}

SplFileInfo::getOwner (  )  [inherited]

Returns:
The current entry's owner name.

Definition at line 888 of file spl.php.

00888 {}

SplFileInfo::getPath (  )  [inherited]

Returns:
the path part only.

Definition at line 852 of file spl.php.

00852 {}  

SplFileInfo::getPathInfo ( string  class_name = NULL  )  [inherited]

Returns:
SplFileInfo created for the path

Parameters:
class_name name of class to instantiate
See also:
SplFileInfo::setInfoClass()

Definition at line 872 of file spl.php.

00872 {}

SplFileInfo::getPathname (  )  [inherited]

Returns:
The current entries path and file name.

Definition at line 866 of file spl.php.

00866 {}  

SplFileInfo::getPerms (  )  [inherited]

Returns:
The current entry's permissions.

Definition at line 876 of file spl.php.

00876 {}

SplFileInfo::getRealPath (  )  [inherited]

Returns:
The resolved path

Definition at line 940 of file spl.php.

00940 {}

SplFileInfo::getSize (  )  [inherited]

Returns:
The current entry's size in bytes .

Definition at line 884 of file spl.php.

00884 {}

RecursiveDirectoryIterator::getSubPath (  ) 

Returns:
sub path only (without main path)

Definition at line 1054 of file spl.php.

01054 {}

RecursiveDirectoryIterator::getSubPathname (  ) 

Returns:
the current sub path

Definition at line 1058 of file spl.php.

01058 {}

SplFileInfo::getType (  )  [inherited]

Returns:
The current entry's file type.

Definition at line 908 of file spl.php.

00908 {}

RecursiveDirectoryIterator::hasChildren (  ) 

Returns:
whether the current is a directory (not '.

' or '..').

Implements RecursiveIterator.

Definition at line 1046 of file spl.php.

01046 {}  

SplFileInfo::isDir (  )  [inherited]

Returns:
Whether the current entry is a directory.

Definition at line 928 of file spl.php.

00928 {}  

DirectoryIterator::isDot (  )  [inherited]

Returns:
Whether the current entry is either '.

' or '..'.

Definition at line 1004 of file spl.php.

01004 {}  

SplFileInfo::isExecutable (  )  [inherited]

Returns:
Whether the current entry is executable.

Definition at line 920 of file spl.php.

00920 {}

SplFileInfo::isFile (  )  [inherited]

Returns:
Whether the current entry is .

Definition at line 924 of file spl.php.

00924 {}

DirectoryIterator::isLink (  )  [inherited]

Returns:
whether the current entry is a link.

Reimplemented from SplFileInfo.

Definition at line 1008 of file spl.php.

01008 {}

SplFileInfo::isReadable (  )  [inherited]

Returns:
Whether the current entry is readable.

Definition at line 916 of file spl.php.

00916 {}

SplFileInfo::isWritable (  )  [inherited]

Returns:
Whether the current entry is writeable.

Definition at line 912 of file spl.php.

00912 {}

RecursiveDirectoryIterator::key (  ) 

Returns:
getPathname() or getFilename() depending on flags

Reimplemented from DirectoryIterator.

Definition at line 1038 of file spl.php.

01038 {}

DirectoryIterator::next (  )  [inherited]

Move forward to next element.

Implements Iterator.

Definition at line 1000 of file spl.php.

01000 {}

SplFileInfo::openFile ( mode = 'r',
use_include_path = false,
context = NULL 
) [inherited]

Open the current file as a SplFileObject instance.

Parameters:
mode open mode
use_include_path whether to search include paths (don't use)
context resource context to pased to open function
Exceptions:
RuntimeException if file cannot be opened (e.g. insufficient access rights).
Returns:
The opened file as a SplFileObject instance
See also:
SplFileObject

SplFileInfo::setFileClass()

file()

Definition at line 959 of file spl.php.

00959 {}

DirectoryIterator::rewind (  )  [inherited]

Rewind the Iterator to the first element.

Implements Iterator.

Definition at line 986 of file spl.php.

00986 {}

SplFileInfo::setFileClass ( string  class_name = "SplFileObject"  )  [inherited]

Parameters:
class_name name of class used with openFile().

Must be derived from SPLFileObject.

Definition at line 964 of file spl.php.

00964 {}

SplFileInfo::setInfoClass ( string  class_name = "SplFileInfo"  )  [inherited]

Parameters:
class_name name of class used with getFileInfo(), getPathInfo().

Must be derived from SplFileInfo.

Definition at line 969 of file spl.php.

00969 {}

DirectoryIterator::valid (  )  [inherited]

Check if there is a current element after calls to rewind() or next().

Implements Iterator.

Definition at line 989 of file spl.php.

00989 {}


Member Data Documentation

const CURRENT_AS_FILEINFO RecursiveDirectoryIterator::x00000010

Definition at line 1022 of file spl.php.

const KEY_AS_FILENAME RecursiveDirectoryIterator::x00000020

Definition at line 1023 of file spl.php.

const NEW_CURRENT_AND_KEY RecursiveDirectoryIterator::x00000030

Definition at line 1024 of file spl.php.


The documentation for this class was generated from the following file:
Generated on Thu Apr 26 01:06:55 2007 for SPL-StandardPHPLibrary by  doxygen 1.5.2