SplFileInfo::getType
Gets file type
Beschreibung
public string SplFileInfo::getType
( void
)
Parameter-Liste
Diese Funktion hat keine Parameter.
Rückgabewerte
A string representing the type of the entry.
May be one of file, link,
or dir
Fehler/Exceptions
Throws a RuntimeException on error.
Beispiele
Beispiel #1 SplFileInfo::getType example
<?php
$info = new SplFileInfo(__FILE__);
echo $info->getType().PHP_EOL;
$info = new SplFileInfo(dirname(__FILE__));
echo $info->getType();
?>
Das oben gezeigte Beispiel erzeugt
eine ähnliche Ausgabe wie: