DirectoryIterator::isFile
DirectoryIterator::isReadable
DirectoryIterator
PHP Manual

# DirectoryIterator::isLink

(PHP 5 <= 5.1.1)

DirectoryIterator::isLink — Returns true if file is symbolic link

### Descripción

bool DirectoryIterator::isLink ( void )
Warning

Esta función no está documentada actualmente, solamente se encuentra disponible la lista de parámetros.

Checks if the current element is a symbolic link.

### Lista de parámetros

This function has no parameters.

### Valores retornados

`TRUE` if the entry is a symbolic link, otherwise `FALSE`

### Ejemplos

Example #1 A DirectoryIterator::isLink example

This example contains a recursive function for removing a directory tree.

`<?php
/**
* This function will recursively delete all files in the given path, without
* following symlinks.
*
* @param string $path Path to the directory to remove.
*/
function removeDir($path) {
$dir = new DirectoryIterator($path);
foreach ($dir as $fileinfo) {
if ($fileinfo->isFile() || $fileinfo->isSymlink()) {
unlink($fileinfo->getPathName());
} elseif (!$fileinfo->isDot() && $fileinfo->isDir()) {
removeDir($fileinfo->getPathName());
}
}
rmdir($path);
}
removeDir('foo');
?>`

DirectoryIterator::isFile
DirectoryIterator::isReadable
DirectoryIterator
PHP Manual