ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
EmptyDir.php
Go to the documentation of this file.
1
<?
php
2
3
namespace
League\Flysystem\Plugin
;
4
5
class
EmptyDir
extends
AbstractPlugin
6
{
12
public
function
getMethod
()
13
{
14
return
'emptyDir'
;
15
}
16
22
public
function
handle
($dirname)
23
{
24
$listing = $this->filesystem->listContents($dirname,
false
);
25
26
foreach
($listing as $item) {
27
if
($item[
'type'
] ===
'dir'
) {
28
$this->filesystem->deleteDir($item[
'path'
]);
29
}
else
{
30
$this->filesystem->delete($item[
'path'
]);
31
}
32
}
33
}
34
}
League\Flysystem\Plugin\AbstractPlugin
Definition:
AbstractPlugin.php:8
League\Flysystem\Plugin
Definition:
AbstractPlugin.php:3
League\Flysystem\Plugin\EmptyDir\getMethod
getMethod()
Get the method name.
Definition:
EmptyDir.php:12
php
League\Flysystem\Plugin\EmptyDir\handle
handle($dirname)
Empty a directory's contents.
Definition:
EmptyDir.php:22
League\Flysystem\Plugin\EmptyDir
Definition:
EmptyDir.php:5
libs
composer
vendor
league
flysystem
src
Plugin
EmptyDir.php
Generated on Thu Jan 30 2025 19:01:20 for ILIAS by
1.8.13 (using
Doxyfile
)