|
SplFileInfo::openFileGets an SplFileObject object for the file Description
public SplFileObject SplFileInfo::openFile(string
$mode = "r", bool $useIncludePath = false , resourcenull $context = null )Creates an SplFileObject object of the file. This is useful because SplFileObject contains additional methods for manipulating the file whereas SplFileInfo is only useful for gaining information, like whether the file is writable. Parameters
Return ValuesThe opened file as an SplFileObject object. Errors/ExceptionsA RuntimeException if the file cannot be opened (e.g. insufficient access rights). Changelog
Examples
Example #1 SplFileInfo::openFile example
See Also
|