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

Breadcrumb

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

function Filesystem::removeJunction

Removes a Windows NTFS junction.

Return value

bool

1 call to Filesystem::removeJunction()
Filesystem::removeEdgeCases in vendor/composer/composer/src/Composer/Util/Filesystem.php

File

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

Class

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

Namespace

Composer\Util

Code

public function removeJunction(string $junction) {
    if (!Platform::isWindows()) {
        return false;
    }
    $junction = rtrim(str_replace('/', DIRECTORY_SEPARATOR, $junction), DIRECTORY_SEPARATOR);
    if (!$this->isJunction($junction)) {
        throw new IOException(sprintf('%s is not a junction and thus cannot be removed as one', $junction));
    }
    return $this->rmdir($junction);
}

API Navigation

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