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

search for in the

SplFileInfo::isDir> <SplFileInfo::getSize
Last updated: Fri, 14 Aug 2009

view this page in

SplFileInfo::getType

(PHP 5 >= 5.1.2)

SplFileInfo::getTypeLit le type de fichier

Description

public string SplFileInfo::getType ( void )

Retourne le type de fichier.

Liste de paramètres

Cette fonction ne contient aucun paramètre.

Valeurs de retour

Une string représentant le type de fichier. Cela peut être file, link, ou dir

Erreurs / Exceptions

Émet une exception RuntimeException.

Exemples

Exemple #1 Exemple avec SplFileInfo::getType()

<?php

$info 
= new SplFileInfo(__FILE__);
echo 
$info->getType().PHP_EOL;

$info = new SplFileInfo(dirname(__FILE__));
echo 
$info->getType();

?>

L'exemple ci-dessus va afficher quelque chose de similaire à :

file
dir



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

SplFileInfo::isDir> <SplFileInfo::getSize
Last updated: Fri, 14 Aug 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites