Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Filesystem.php

function Filesystem::resolveSymlinkedDirectorySymlink

resolve pathname to symbolic link of a directory

Parameters

string $pathname directory path to resolve:

Return value

string resolved path to symbolic link or original pathname (unresolved)

2 calls to Filesystem::resolveSymlinkedDirectorySymlink()
Filesystem::isSymlinkedDirectory in vendor/composer/composer/src/Composer/Util/Filesystem.php
return true if that directory is a symlink.
Filesystem::unlinkSymlinkedDirectory in vendor/composer/composer/src/Composer/Util/Filesystem.php

File

vendor/composer/composer/src/Composer/Util/Filesystem.php, line 808

Class

Filesystem
@author Jordi Boggiano <j.boggiano@seld.be> @author Johannes M. Schmitt <schmittjoh@gmail.com>

Namespace

Composer\Util

Code

private function resolveSymlinkedDirectorySymlink(string $pathname) : string {
    if (!is_dir($pathname)) {
        return $pathname;
    }
    $resolved = rtrim($pathname, '/');
    if (0 === \strlen($resolved)) {
        return $pathname;
    }
    return $resolved;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal