private static function ScriptHandler::rmdirWindows in Varbase: The Ultimate Drupal CMS Starter Kit (Bootstrap Ready) 8.5
Same name and namespace in other branches
- 8.8 src/composer/ScriptHandler.php \Varbase\composer\ScriptHandler::rmdirWindows()
- 8.4 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:
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 181
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);
}