mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 22:33:55 -07:00
Updated
This commit is contained in:
parent
ac5996f764
commit
a30b199b30
2 changed files with 1 additions and 22 deletions
|
@ -94,7 +94,7 @@ if (is_file(BB_ROOT . '.env')) {
|
||||||
}
|
}
|
||||||
// composer dir
|
// composer dir
|
||||||
if (is_dir(BB_ROOT . 'vendor')) {
|
if (is_dir(BB_ROOT . 'vendor')) {
|
||||||
rmdir_rec(BB_ROOT . 'vendor');
|
removeDir(BB_ROOT . 'vendor');
|
||||||
if (!is_dir(BB_ROOT . 'vendor')) {
|
if (!is_dir(BB_ROOT . 'vendor')) {
|
||||||
out("- Composer directory successfully removed!");
|
out("- Composer directory successfully removed!");
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -117,27 +117,6 @@ function runProcess(string $cmd, string $input = null): void
|
||||||
proc_close($process);
|
proc_close($process);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove directory recursively
|
|
||||||
*
|
|
||||||
* @param string $dir
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
function rmdir_rec(string $dir): void
|
|
||||||
{
|
|
||||||
$it = new RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS);
|
|
||||||
$files = new RecursiveIteratorIterator($it,
|
|
||||||
RecursiveIteratorIterator::CHILD_FIRST);
|
|
||||||
foreach ($files as $file) {
|
|
||||||
if ($file->isDir()) {
|
|
||||||
rmdir($file->getPathname());
|
|
||||||
} else {
|
|
||||||
unlink($file->getPathname());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
rmdir($dir);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Setting permissions recursively
|
* Setting permissions recursively
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue