SplFileInfo::isDir

Tells if the file is a directory

Beschreibung

public bool SplFileInfo::isDir ( void )

This method can be used to determine if the file is a directory.

Parameter-Liste

Diese Funktion hat keine Parameter.

Rückgabewerte

Returns TRUE if a directory, FALSE otherwise.

Beispiele

Beispiel #1 SplFileInfo::isDir example

<?php
$d 
= new SplFileInfo(dirname(__FILE__));
var_dump($d->isDir());

$d = new SplFileInfo(__FILE__);
var_dump($d->isDir());
?>

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

bool(true)
bool(false)