Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

splfileinfo.getrealpath(3) [php man page]

SPLFILEINFO.GETREALPATH(3)						 1						SPLFILEINFO.GETREALPATH(3)

SplFileInfo::getRealPath - Gets absolute path to file

SYNOPSIS
public string SplFileInfo::getRealPath (void ) DESCRIPTION
This method expands all symbolic links, resolves relative references and returns the real path to the file. PARAMETERS
This function has no parameters. RETURN VALUES
Returns the path to the file. EXAMPLES
Example #1 SplFileInfo.getRealPath(3) example <?php $info = new SplFileInfo('/..//./../../'.__FILE__); var_dump($info->getRealPath()); $info = new SplFileInfo('/tmp'); var_dump($info->getRealPath()); ?> The above example will output something similar to: string(28) "/private/tmp/phptempfile.php" string(12) "/private/tmp" SEE ALSO
SplFileInfo::isLink. PHP Documentation Group SPLFILEINFO.GETREALPATH(3)

Check Out this Related Man Page

SPLFILEOBJECT(3)							 1							  SPLFILEOBJECT(3)

The SplFileObject class

INTRODUCTION
The SplFileObject class offers an object oriented interface for a file. CLASS SYNOPSIS
SplFileObject SplFileObjectextends SplFileInfoRecursiveIteratorSeekableIterator Constants o const integer$SplFileObject::DROP_NEW_LINE1 o const integer$SplFileObject::READ_AHEAD2 o const integer$SplFileObject::SKIP_EMPTY4 o const integer$SplFileObject::READ_CSV8 Methods o public SplFileObject::__construct (string $filename, [string $open_mode = "r"], [bool $use_include_path = false], [resource $con- text]) o public string|array SplFileObject::current (void ) o public bool SplFileObject::eof (void ) o public bool SplFileObject::fflush (void ) o public string SplFileObject::fgetc (void ) o public array SplFileObject::fgetcsv ([string $delimiter = ","], [string $enclosure = " o public string SplFileObject::fgets (void ) o public string SplFileObject::fgetss ([string $allowable_tags]) o public bool SplFileObject::flock (int $operation, [int &$wouldblock]) o public int SplFileObject::fpassthru (void ) o public int SplFileObject::fputcsv (array $fields, [string $delimiter = ","], [string $enclosure = '"'], [string $escape = " o public string SplFileObject::fread (int $length) o public mixed SplFileObject::fscanf (string $format, [mixed &$...]) o public int SplFileObject::fseek (int $offset, [int $whence = SEEK_SET]) o public array SplFileObject::fstat (void ) o public int SplFileObject::ftell (void ) o public bool SplFileObject::ftruncate (int $size) o public int SplFileObject::fwrite (string $str, [int $length]) o public void SplFileObject::getChildren (void ) o public array SplFileObject::getCsvControl (void ) o public int SplFileObject::getFlags (void ) o public int SplFileObject::getMaxLineLen (void ) o public bool SplFileObject::hasChildren (void ) o public int SplFileObject::key (void ) o public void SplFileObject::next (void ) o public void SplFileObject::rewind (void ) o public void SplFileObject::seek (int $line_pos) o public void SplFileObject::setCsvControl ([string $delimiter = ","], [string $enclosure = " o public void SplFileObject::setFlags (int $flags) o public void SplFileObject::setMaxLineLen (int $max_len) o public void SplFileObject::__toString (void ) o public bool SplFileObject::valid (void ) Inherited methods o public SplFileInfo::__construct (string $file_name) o public int SplFileInfo::getATime (void ) o public string SplFileInfo::getBasename ([string $suffix]) o public int SplFileInfo::getCTime (void ) o public string SplFileInfo::getExtension (void ) o public SplFileInfo SplFileInfo::getFileInfo ([string $class_name]) o public string SplFileInfo::getFilename (void ) o public int SplFileInfo::getGroup (void ) o public int SplFileInfo::getInode (void ) o public string SplFileInfo::getLinkTarget (void ) o public int SplFileInfo::getMTime (void ) o public int SplFileInfo::getOwner (void ) o public string SplFileInfo::getPath (void ) o public SplFileInfo SplFileInfo::getPathInfo ([string $class_name]) o public string SplFileInfo::getPathname (void ) o public int SplFileInfo::getPerms (void ) o public string SplFileInfo::getRealPath (void ) o public int SplFileInfo::getSize (void ) o public string SplFileInfo::getType (void ) o public bool SplFileInfo::isDir (void ) o public bool SplFileInfo::isExecutable (void ) o public bool SplFileInfo::isFile (void ) o public bool SplFileInfo::isLink (void ) o public bool SplFileInfo::isReadable (void ) o public bool SplFileInfo::isWritable (void ) o public SplFileObject SplFileInfo::openFile NULL ([string $open_mode = "r"], [bool $use_include_path = false], [resource $context]) o public void SplFileInfo::setFileClass ([string $class_name = "SplFileObject"]) o public void SplFileInfo::setInfoClass ([string $class_name = "SplFileInfo"]) o public void SplFileInfo::__toString (void ) PREDEFINED CONSTANTS
o SplFileObject::DROP_NEW_LINE -Drop newlines at the end of a line. o SplFileObject::READ_AHEAD -Read on rewind/next. o SplFileObject::SKIP_EMPTY -Skips empty lines in the file. This requires the READ_AHEAD flag be enabled, to work as expected. o SplFileObject::READ_CSV -Read lines as CSV rows. CHANGELOG
+--------+---------------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------------+ | 5.3.9 | | | | | | | | | | SplFileObject::SKIP_EMPTY value changed to 4. | | | Previously, value was 6. | | | | +--------+---------------------------------------------------+ PHP Documentation Group SPLFILEOBJECT(3)
Man Page