BookStack\Services\UploadService::isFolderEmpty PHP Method

isFolderEmpty() protected method

Check whether or not a folder is empty.
protected isFolderEmpty ( $path ) : boolean
$path
return boolean
    protected function isFolderEmpty($path)
    {
        $files = $this->getStorage()->files($path);
        $folders = $this->getStorage()->directories($path);
        return count($files) === 0 && count($folders) === 0;
    }