SPL-StandardPHPLibrary
Public Member Functions | Public Attributes | List of all members
RecursiveDirectoryIterator Class Reference
Inheritance diagram for RecursiveDirectoryIterator:
Inheritance graph
Collaboration diagram for RecursiveDirectoryIterator:
Collaboration graph

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
 
const CURRENT_AS_PATHNAME
 
const CURRENT_AS_SELF
 
const KEY_AS_FILENAME
 
const KEY_AS_PATHNAME
 
const NEW_CURRENT_AND_KEY
 

Detailed Description

recursive directory iterator

Version
1.1
Since
PHP 5.0

Definition at line 1034 of file spl.php.

Constructor & Destructor Documentation

RecursiveDirectoryIterator::__construct (   $path,
  $flags = 0 
)

Construct a directory iterator from a path-string.

Parameters
$pathdirectory to iterate.
$flagsopen flags
  • CURRENT_AS_FILEINFO
  • CURRENT_AS_SELF
  • CURRENT_AS_PATHNAME
  • KEY_AS_PATHNAME
  • KEY_AS_FILENAME
  • NEW_CURRENT_AND_KEY

Definition at line 1056 of file spl.php.

1056 {}

Member Function Documentation

DirectoryIterator::__toString ( )
inherited
Returns
getFilename()

Definition at line 1026 of file spl.php.

1026 {}
RecursiveDirectoryIterator::current ( )
Returns
getFilename() or getFileInfo() depending on flags

Implements Iterator.

Definition at line 1064 of file spl.php.

1064 {}
SplFileInfo::getATime ( )
inherited
Returns
The current entry's last access time.

Definition at line 910 of file spl.php.

910 {}
RecursiveDirectoryIterator::getChildren ( )
Returns
a RecursiveDirectoryIterator for the current entry.

Implements RecursiveIterator.

Definition at line 1072 of file spl.php.

1072 {}
SplFileInfo::getCTime ( )
inherited
Returns
The current entry's last change time.

Definition at line 918 of file spl.php.

918 {}
SplFileInfo::getFileInfo ( string  class_name = NULL)
inherited
Returns
SplFileInfo created for the file
Parameters
class_namename of class to instantiate
See Also
SplFileInfo::setInfoClass()

Definition at line 876 of file spl.php.

876 {}
SplFileInfo::getFilename ( )
inherited
Returns
the filename only.

Definition at line 870 of file spl.php.

870 {}
SplFileInfo::getGroup ( )
inherited
Returns
The current entry's group name.

Definition at line 906 of file spl.php.

906 {}
SplFileInfo::getInode ( )
inherited
Returns
The current entry's inode.

Definition at line 894 of file spl.php.

894 {}
SplFileInfo::getLinkTarget ( )
inherited
Returns
target of link.

Definition at line 950 of file spl.php.

950 {}
SplFileInfo::getMTime ( )
inherited
Returns
The current entry's last modification time.

Definition at line 914 of file spl.php.

914 {}
SplFileInfo::getOwner ( )
inherited
Returns
The current entry's owner name.

Definition at line 902 of file spl.php.

902 {}
SplFileInfo::getPath ( )
inherited
Returns
the path part only.

Definition at line 866 of file spl.php.

866 {}
SplFileInfo::getPathInfo ( string  class_name = NULL)
inherited
Returns
SplFileInfo created for the path
Parameters
class_namename of class to instantiate
See Also
SplFileInfo::setInfoClass()

Definition at line 886 of file spl.php.

886 {}
SplFileInfo::getPathname ( )
inherited
Returns
The current entries path and file name.

Definition at line 880 of file spl.php.

880 {}
SplFileInfo::getPerms ( )
inherited
Returns
The current entry's permissions.

Definition at line 890 of file spl.php.

890 {}
SplFileInfo::getRealPath ( )
inherited
Returns
The resolved path

Definition at line 954 of file spl.php.

954 {}
SplFileInfo::getSize ( )
inherited
Returns
The current entry's size in bytes .

Definition at line 898 of file spl.php.

898 {}
RecursiveDirectoryIterator::getSubPath ( )
Returns
sub path only (without main path)

Definition at line 1076 of file spl.php.

1076 {}
RecursiveDirectoryIterator::getSubPathname ( )
Returns
the current sub path

Definition at line 1080 of file spl.php.

1080 {}
SplFileInfo::getType ( )
inherited
Returns
The current entry's file type.

Definition at line 922 of file spl.php.

922 {}
RecursiveDirectoryIterator::hasChildren ( )
Returns
whether the current is a directory (not '.' or '..').

Implements RecursiveIterator.

Definition at line 1068 of file spl.php.

1068 {}
SplFileInfo::isDir ( )
inherited
Returns
Whether the current entry is a directory.

Definition at line 942 of file spl.php.

942 {}
DirectoryIterator::isDot ( )
inherited
Returns
Whether the current entry is either '.' or '..'.

Definition at line 1018 of file spl.php.

1018 {}
SplFileInfo::isExecutable ( )
inherited
Returns
Whether the current entry is executable.

Definition at line 934 of file spl.php.

934 {}
SplFileInfo::isFile ( )
inherited
Returns
Whether the current entry is .

Definition at line 938 of file spl.php.

938 {}
DirectoryIterator::isLink ( )
inherited
Returns
whether the current entry is a link.

Definition at line 1022 of file spl.php.

1022 {}
SplFileInfo::isReadable ( )
inherited
Returns
Whether the current entry is readable.

Definition at line 930 of file spl.php.

930 {}
SplFileInfo::isWritable ( )
inherited
Returns
Whether the current entry is writeable.

Definition at line 926 of file spl.php.

926 {}
RecursiveDirectoryIterator::key ( )
Returns
getPathname() or getFilename() depending on flags

Implements Iterator.

Definition at line 1060 of file spl.php.

1060 {}
DirectoryIterator::next ( )
inherited

Move forward to next element.

Implements Iterator.

Definition at line 1014 of file spl.php.

1014 {}
SplFileInfo::openFile (   $mode = 'r',
  $use_include_path = false,
  $context = NULL 
)
inherited

Open the current file as a SplFileObject instance.

Parameters
modeopen mode
use_include_pathwhether to search include paths (don't use)
contextresource context to pased to open function
Exceptions
RuntimeExceptionif 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 973 of file spl.php.

973 {}
DirectoryIterator::rewind ( )
inherited

Rewind the Iterator to the first element.

Implements Iterator.

Definition at line 1000 of file spl.php.

1000 {}
SplFileInfo::setFileClass ( string  class_name = "SplFileObject")
inherited
Parameters
class_namename of class used with openFile(). Must be derived from SPLFileObject.

Definition at line 978 of file spl.php.

978 {}
SplFileInfo::setInfoClass ( string  class_name = "SplFileInfo")
inherited
Parameters
class_namename of class used with getFileInfo(), getPathInfo(). Must be derived from SplFileInfo.

Definition at line 983 of file spl.php.

983 {}
DirectoryIterator::valid ( )
inherited

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

Implements Iterator.

Definition at line 1003 of file spl.php.

1003 {}

Member Data Documentation

const RecursiveDirectoryIterator::CURRENT_AS_FILEINFO

Definition at line 1036 of file spl.php.

const RecursiveDirectoryIterator::CURRENT_AS_PATHNAME

Definition at line 1038 of file spl.php.

const RecursiveDirectoryIterator::CURRENT_AS_SELF

Definition at line 1037 of file spl.php.

const RecursiveDirectoryIterator::KEY_AS_FILENAME
const RecursiveDirectoryIterator::KEY_AS_PATHNAME

Definition at line 1040 of file spl.php.

const RecursiveDirectoryIterator::NEW_CURRENT_AND_KEY

Definition at line 1043 of file spl.php.


The documentation for this class was generated from the following file: