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

search for in the

lstat> <link
Last updated: Fri, 13 Nov 2009

view this page in

linkinfo

(PHP 4, PHP 5)

linkinfoリンクに関する情報を取得する

説明

int linkinfo ( string $path )

リンクに関する情報を取得します。

この関数を使用して (path が指している) リンクが実際に存在するかどうかを、 (stat.h で定義されている S_ISLNK マクロと同じ方法で) チェックします。

パラメータ

path

リンクへのパス。

返り値

linkinfo()は、lstat システムコールで返された Unix C 言語の stat 構造体の st_dev フィールドを返します。 0 を返し、エラーの場合に FALSE を返します。

変更履歴

バージョン 説明
5.3.0 この関数は、Windows プラットフォーム (Vista 以降、あるいは Server 2008 以降) でも動作するようになりました。

例1 linkinfo() の例

<?php

echo linkinfo('/vmlinuz'); // 835

?>

参考

  • symlink() - シンボリックリンクを作成する
  • link() - ハードリンクを作成する
  • readlink() - シンボリックリンク先を返す



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

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