PHP Manual
Function Reference
Other Basic Extensions
SPL
Introduction
Datastructures
Iterators
Interfaces
Exceptions
SPL Functions
File Handling
Miscellaneous Classes and Interfaces
spl_object_id
SplFileInfo
SPL
PHP Manual
File Handling
Table of Contents
SplFileInfo
— The SplFileInfo class
SplFileInfo::__construct
— Construct a new SplFileInfo object
SplFileInfo::getATime
— Gets last access time of the file
SplFileInfo::getBasename
— Gets the base name of the file
SplFileInfo::getCTime
— Gets the inode change time
SplFileInfo::getExtension
— Gets the file extension
SplFileInfo::getFileInfo
— Gets an SplFileInfo object for the file
SplFileInfo::getFilename
— Gets the filename
SplFileInfo::getGroup
— Gets the file group
SplFileInfo::getInode
— Gets the inode for the file
SplFileInfo::getLinkTarget
— Gets the target of a link
SplFileInfo::getMTime
— Gets the last modified time
SplFileInfo::getOwner
— Gets the owner of the file
SplFileInfo::getPath
— Gets the path without filename
SplFileInfo::getPathInfo
— Gets an SplFileInfo object for the path
SplFileInfo::getPathname
— Gets the path to the file
SplFileInfo::getPerms
— Gets file permissions
SplFileInfo::getRealPath
— Gets absolute path to file
SplFileInfo::getSize
— Gets file size
SplFileInfo::getType
— Gets file type
SplFileInfo::isDir
— Tells if the file is a directory
SplFileInfo::isExecutable
— Tells if the file is executable
SplFileInfo::isFile
— Tells if the object references a regular file
SplFileInfo::isLink
— Tells if the file is a link
SplFileInfo::isReadable
— Tells if file is readable
SplFileInfo::isWritable
— Tells if the entry is writable
SplFileInfo::openFile
— Gets an SplFileObject object for the file
SplFileInfo::setFileClass
— Sets the class used with SplFileInfo::openFile
SplFileInfo::setInfoClass
— Sets the class used with SplFileInfo::getFileInfo and SplFileInfo::getPathInfo
SplFileInfo::__toString
— Returns the path to the file as a string
SplFileObject
— The SplFileObject class
SplFileObject::__construct
— Construct a new file object
SplFileObject::current
— Retrieve current line of file
SplFileObject::eof
— Reached end of file
SplFileObject::fflush
— Flushes the output to the file
SplFileObject::fgetc
— Gets character from file
SplFileObject::fgetcsv
— Gets line from file and parse as CSV fields
SplFileObject::fgets
— Gets line from file
SplFileObject::fgetss
— Gets line from file and strip HTML tags
SplFileObject::flock
— Portable file locking
SplFileObject::fpassthru
— Output all remaining data on a file pointer
SplFileObject::fputcsv
— Write a field array as a CSV line
SplFileObject::fread
— Read from file
SplFileObject::fscanf
— Parses input from file according to a format
SplFileObject::fseek
— Seek to a position
SplFileObject::fstat
— Gets information about the file
SplFileObject::ftell
— Return current file position
SplFileObject::ftruncate
— Truncates the file to a given length
SplFileObject::fwrite
— Write to file
SplFileObject::getChildren
— No purpose
SplFileObject::getCsvControl
— Get the delimiter, enclosure and escape character for CSV
SplFileObject::getCurrentLine
— Alias of SplFileObject::fgets
SplFileObject::getFlags
— Gets flags for the SplFileObject
SplFileObject::getMaxLineLen
— Get maximum line length
SplFileObject::hasChildren
— SplFileObject does not have children
SplFileObject::key
— Get line number
SplFileObject::next
— Read next line
SplFileObject::rewind
— Rewind the file to the first line
SplFileObject::seek
— Seek to specified line
SplFileObject::setCsvControl
— Set the delimiter, enclosure and escape character for CSV
SplFileObject::setFlags
— Sets flags for the SplFileObject
SplFileObject::setMaxLineLen
— Set maximum line length
SplFileObject::__toString
— Returns the current line as a string
SplFileObject::valid
— Not at EOF
SplTempFileObject
— The SplTempFileObject class
SplTempFileObject::__construct
— Construct a new temporary file object
SPL provides a number of classes to work with files.