private static function ScriptHandler::rmdirWindows in Varbase: The Ultimate Drupal CMS Starter Kit (Bootstrap Ready) 8.8
Same name and namespace in other branches
- 8.4 src/composer/ScriptHandler.php \Varbase\composer\ScriptHandler::rmdirWindows()
- 8.5 src/composer/ScriptHandler.php \Varbase\composer\ScriptHandler::rmdirWindows()
- 8.6 src/composer/ScriptHandler.php \Varbase\composer\ScriptHandler::rmdirWindows()
- 8.7 src/composer/ScriptHandler.php \Varbase\composer\ScriptHandler::rmdirWindows()
- 9.0.x src/composer/ScriptHandler.php \Varbase\composer\ScriptHandler::rmdirWindows()
Remove a directory on Windows.
Parameters
string $dirname: The directory name.
1 call to ScriptHandler::rmdirWindows()
- ScriptHandler::removeWindowsGitDirectories in src/
composer/ ScriptHandler.php - Find and return the path to .git repository in root folder.
File
- src/
composer/ ScriptHandler.php, line 200
Class
- ScriptHandler
- Varbase Composer Script Handler.
Namespace
Varbase\composerCode
private static function rmdirWindows($dirname) {
if (is_file($dirname)) {
unlink($dirname);
return;
}
$dir = dir($dirname);
while (FALSE !== ($entry = $dir
->read())) {
if ($entry === '.' || $entry === '..') {
continue;
}
self::rmdirWindows("{$dirname}/{$entry}");
}
$dir
->close();
rmdir($dirname);
}