public static function readSymbolicLink(string $path) : string
    {
        $exception = null;

        try {
            $result = ErrorCatcher::run(static function() use ($path) {
                return readlink($path);
            });

            if ($result !== false) {
                return $result;
            }
        } catch (\ErrorException $e) {
            $exception = $e;
        }

        throw new IoException('Error reading symbolic link ' . $path, 0, $exception);
    }
public static function readSymbolicLink(string $path) : string
    {
        $exception = null;

        try {
            $result = ErrorCatcher::run(static function() use ($path) {
                return readlink($path);
            });

            if ($result !== false) {
                return $result;
            }
        } catch (\ErrorException $e) {
            $exception = $e;
        }

        throw new IoException('Error reading symbolic link ' . $path, 0, $exception);
    }
public static function readSymbolicLink ( string $ path ) : string { $ exception = null ; try { $ result = ErrorCatcher :: run ( static function ( ) use ( $ path ) { return readlink ( $ path ) ; } ) ; if ( $ result !== false ) { return $ result ; } } catch ( \ ErrorException $ e ) { $ exception = $ e ; } throw new IoException ( 'Error reading symbolic link ' . $ path , 0 , $ exception ) ; }
Returns the target of a symbolic link.

@param string $path The symbolic link path.

@return string The contents of the symbolic link path.

@throws IoException If an error occurs.
Returns the target of a symbolic link .