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

search for in the

DirectoryIterator::isExecutable> <DirectoryIterator::isDir
Last updated: Fri, 20 May 2011

view this page in

DirectoryIterator::isDot

(PHP 5)

DirectoryIterator::isDotDetermine if current DirectoryIterator item is '.' or '..'

Descripción

public bool DirectoryIterator::isDot ( void )

Determines if the current DirectoryIterator item is a directory and either . or ...

Parámetros

Esta función no tiene parámetros.

Valores devueltos

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

Ejemplos

Example #1 A DirectoryIterator::isDot() example

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

<?php
$iterator 
= new DirectoryIterator(dirname(__FILE__));
foreach (
$iterator as $fileinfo) {
    if (!
$fileinfo->isDot()) {
        echo 
$fileinfo->getFilename() . "\n";
    }
}
?>

El resultado del ejemplo sería algo similar a:

apple.jpg
banana.jpg
example.php
pears.jpg

Ver también



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

 
show source | credits | stats | sitemap | contact | advertising | mirror sites