PHP
downloads | documentation | faq | getting help | mailing lists | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

DirectoryIterator::isExecutable> <DirectoryIterator::isDir
Last updated: Fri, 28 Nov 2008

view this page in

DirectoryIterator::isDot

(PHP 5)

DirectoryIterator::isDotReturns true if current entry is '.' or '..'

Description

bool DirectoryIterator::isDot ( void )

Check whether the current entry is a directory and either . or ...

Parameters

This function has no parameters.

Return Values

TRUE if the entry is . or .., otherwise FALSE

Examples

Example #1 A DirectoryIterator::isDot example

This example will list all files, omitting the . and .. entries.

<?php
$dir 
= new DirectoryIterator(dirname(__FILE__));
foreach (
$dir as $fileinfo) {
    if (!
$fileinfo->isDot()) {
        echo 
'Filename '.$fileinfo->getFilename().PHP_EOL;
    }
}
?>



add a note add a note User Contributed Notes
DirectoryIterator::isDot
There are no user contributed notes for this page.

DirectoryIterator::isExecutable> <DirectoryIterator::isDir
Last updated: Fri, 28 Nov 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites