Oihana PHP

readSymlink.php

Table of Contents

Functions

readSymlink()  : string
Returns the target a symbolic link points to.

Functions

Returns the target a symbolic link points to.

readSymlink(string $link) : string
Parameters
$link : string

Path to the symbolic link.

throws
FileException

If $link is not a symbolic link, or its target cannot be read.

author

Marc Alcaraz (ekameleon)

since
1.2.0
example
use function oihana\files\readSymlink;

echo readSymlink( '/var/www/current' ) ; // '/var/www/releases/42'
Return values
string

The target path the symlink points to.

On this page

Search results