ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
FilesystemHelper.php
Go to the documentation of this file.
1
<?
php
2
3
/*
4
* This file is part of Twig.
5
*
6
* (c) Fabien Potencier
7
*
8
* For the full copyright and license information, please view the LICENSE
9
* file that was distributed with this source code.
10
*/
11
12
class
Twig_Tests_FilesystemHelper
13
{
14
public
static
function
removeDir
($dir)
15
{
16
$iterator =
new
RecursiveIteratorIterator
(
new
RecursiveDirectoryIterator
($dir, PHP_VERSION_ID < 50300 ? 0 : FilesystemIterator::SKIP_DOTS), RecursiveIteratorIterator::CHILD_FIRST);
17
foreach
($iterator as
$filename
=> $fileInfo) {
18
if
($iterator->isDot()) {
19
continue
;
20
}
21
22
if
($fileInfo->isDir()) {
23
rmdir(
$filename
);
24
}
else
{
25
unlink(
$filename
);
26
}
27
}
28
rmdir($dir);
29
}
30
}
Twig_Tests_FilesystemHelper\removeDir
static removeDir($dir)
Definition:
FilesystemHelper.php:14
RecursiveDirectoryIterator
Twig_Tests_FilesystemHelper
Definition:
FilesystemHelper.php:12
$filename
$filename
Definition:
buildRTE.php:89
RecursiveIteratorIterator
php
libs
composer
vendor
twig
twig
test
Twig
Tests
FilesystemHelper.php
Generated on Thu Jan 30 2025 19:01:35 for ILIAS by
1.8.13 (using
Doxyfile
)