ok

Mini Shell

Direktori : /home2/selectio/public_html/myclassicfit.com/vendor/league/flysystem/src/Plugin/
Upload File :
Current File : /home2/selectio/public_html/myclassicfit.com/vendor/league/flysystem/src/Plugin/EmptyDir.php

<?php

namespace League\Flysystem\Plugin;

class EmptyDir extends AbstractPlugin
{
    /**
     * Get the method name.
     *
     * @return string
     */
    public function getMethod()
    {
        return 'emptyDir';
    }

    /**
     * Empty a directory's contents.
     *
     * @param string $dirname
     */
    public function handle($dirname)
    {
        $listing = $this->filesystem->listContents($dirname, false);

        foreach ($listing as $item) {
            if ($item['type'] === 'dir') {
                $this->filesystem->deleteDir($item['path']);
            } else {
                $this->filesystem->delete($item['path']);
            }
        }
    }
}

Zerion Mini Shell 1.0