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

Breadcrumb

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

function Filesystem::unlinkImplementation

delete symbolic link implementation (commonly known as "unlink()")

symbolic links on windows which link to directories need rmdir instead of unlink

2 calls to Filesystem::unlinkImplementation()
Filesystem::ensureDirectoryExists in vendor/composer/composer/src/Composer/Util/Filesystem.php
Filesystem::unlink in vendor/composer/composer/src/Composer/Util/Filesystem.php
Attempts to unlink a file and in case of failure retries after 350ms on windows

File

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

Class

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

Namespace

Composer\Util

Code

private function unlinkImplementation(string $path) : bool {
    if (Platform::isWindows() && is_dir($path) && is_link($path)) {
        return rmdir($path);
    }
    return unlink($path);
}

API Navigation

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