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
Last updated: Fri, 13 Nov 2009

view this page in

SplFileInfo::getLinkTarget

(PHP 5 >= 5.2.2)

SplFileInfo::getLinkTargetリンク先を取得する

説明

public string SplFileInfo::getLinkTarget ( void )

ファイルシステムのリンク先を取得します。

注意: リンク先は、ファイルシステム上の実際のパスではないかもしれません。 SplFileInfo::getRealPath を使用して、ファイルシステム上の実際のパスを調べます。

パラメータ

この関数にはパラメータはありません。

返り値

ファイルシステムのリンク先を返します。

エラー / 例外

エラー時に RuntimeException をスローします。

例1 SplFileInfo::getLinkTarget() の例

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

上の例の出力は、 たとえば以下のようになります。

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

参考



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

SplFileInfo::getMTime> <SplFileInfo::getInode
Last updated: Fri, 13 Nov 2009
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites