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

search for in the

SplFileInfo::getMTime> <SplFileInfo::getInode
[edit] Last updated: Fri, 25 May 2012

view this page in

SplFileInfo::getLinkTarget

(PHP 5 >= 5.2.2)

SplFileInfo::getLinkTargetLit la cible d'un lien symbolique

Description

public string SplFileInfo::getLinkTarget ( void )

Lit la cible d'un lien symbolique.

Note:

Le chemin indiqué n'est pas toujours le chemin réel sur le système de fichiers. Utilisez SplFileInfo::getRealPath() pour déterminer le véritable chemin.

Liste de paramètres

Cette fonction ne contient aucun paramètre.

Valeurs de retour

Retourne la cible du lien symbolique.

Erreurs / Exceptions

Émet une exception RuntimeException en cas d'erreur.

Exemples

Exemple #1 Exemple avec SplFileInfo::getLinkTarget()

<?php
$info 
= new SplFileInfo('/Users/bbieber/workspace');
if (
$info->isLink()) {
    
var_dump($info->getLinkTarget());
    
var_dump($info->getRealPath());
}
?>

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

string(19) "Documents/workspace"
string(34) "/Users/bbieber/Documents/workspace"

Voir aussi



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

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