Man Page: directoryiterator.getpathname
Operating Environment: php
Section: 3
DIRECTORYITERATOR.GETPATHNAME(3) 1 DIRECTORYITERATOR.GETPATHNAME(3) DirectoryIterator::getPathname - Return path and file name of current DirectoryIterator itemSYNOPSISpublic string DirectoryIterator::getPathname (void )DESCRIPTIONGet the path and file name of the current file.PARAMETERSThis function has no parameters.RETURN VALUESReturns the path and file name of current file. Directories do not have a trailing slash.EXAMPLESExample #1 DirectoryIterator.getPathname(3) example <?php $iterator = new DirectoryIterator(dirname(__FILE__)); foreach ($iterator as $fileinfo) { echo $fileinfo->getPathname() . " "; } ?> The above example will output something similar to: /home/examples/. /home/examples/.. /home/examples/apple.jpg /home/examples/banana.jpg /home/examples/getpathname.php /home/examples/pear.jpgSEE ALSODirectoryIterator::getBasename, DirectoryIterator::getFilename, DirectoryIterator::getPath, pathinfo(3). PHP Documentation Group DIRECTORYITERATOR.GETPATHNAME(3)