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\UtilCode
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);
}