• « SplFileInfo::isFile
  • SplFileInfo::isReadable »
  • PHP Manual
  • SplFileInfo
  • Tells if the file is a link

SplFileInfo::isLink

(PHP 5 >= 5.1.2, PHP 7)

SplFileInfo::isLink — Tells if the file is a link

Açıklama

public SplFileInfo::isLink ( void ) : bool

Use this method to check if the file referenced by the SplFileInfo object is a link.

Değiştirgeler

Bu işlevin değiştirgesi yoktur.

Dönen Değerler

Returns TRUE if the file is a link, FALSE otherwise.

Örnekler

Örnek 1 SplFileInfo::isLink() example

<?php
$info 
= new SplFileInfo('/path/to/symlink');
if (
$info->isLink()) {
    echo 
'The real path is '.$info->getRealPath();
}
?>

Ayrıca Bakınız

  • SplFileInfo::getRealPath() - Gets absolute path to file