SPL-StandardPHPLibrary
Public Member Functions
SplFileInfo Class Reference
Inheritance diagram for SplFileInfo:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 __construct ($file_name)
 __toString ()
 getATime ()
 getCTime ()
 getFileInfo (string class_name=NULL)
 getFilename ()
 getGroup ()
 getInode ()
 getLinkTarget ()
 getMTime ()
 getOwner ()
 getPath ()
 getPathInfo (string class_name=NULL)
 getPathname ()
 getPerms ()
 getRealPath ()
 getSize ()
 getType ()
 isDir ()
 isExecutable ()
 isFile ()
 isLink ()
 isReadable ()
 isWritable ()
 openFile ($mode= 'r', $use_include_path=false, $context=NULL)
 setFileClass (string class_name="SplFileObject")
 setInfoClass (string class_name="SplFileInfo")

Detailed Description

File info class.

Since:
PHP 5.1.3

Definition at line 856 of file spl.php.


Constructor & Destructor Documentation

SplFileInfo::__construct ( file_name)

Construct a file info object.

Parameters:
$file_namepath or file name

Reimplemented in DirectoryIterator.

Definition at line 862 of file spl.php.

{}

Member Function Documentation

SplFileInfo::__toString ( )
Returns:
getPathname()

Reimplemented in DirectoryIterator, and SplFileObject.

Definition at line 958 of file spl.php.

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

Definition at line 910 of file spl.php.

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

Definition at line 918 of file spl.php.

{}
SplFileInfo::getFileInfo ( string  class_name = NULL)
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.

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

Definition at line 870 of file spl.php.

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

Definition at line 906 of file spl.php.

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

Definition at line 894 of file spl.php.

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

Definition at line 950 of file spl.php.

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

Definition at line 914 of file spl.php.

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

Definition at line 902 of file spl.php.

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

Definition at line 866 of file spl.php.

{}
SplFileInfo::getPathInfo ( string  class_name = NULL)
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.

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

Definition at line 880 of file spl.php.

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

Definition at line 890 of file spl.php.

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

Definition at line 954 of file spl.php.

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

Definition at line 898 of file spl.php.

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

Definition at line 922 of file spl.php.

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

Definition at line 942 of file spl.php.

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

Definition at line 934 of file spl.php.

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

Definition at line 938 of file spl.php.

{}
SplFileInfo::isLink ( )
Returns:
whether the current entry is a link.

Reimplemented in DirectoryIterator.

Definition at line 946 of file spl.php.

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

Definition at line 930 of file spl.php.

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

Definition at line 926 of file spl.php.

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

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.

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

Definition at line 978 of file spl.php.

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

Definition at line 983 of file spl.php.

{}

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