protected function isEmptyDir($path)
    {
        if ($this->fs->exists($path) === true) {
            $finder = new Finder();
            $finder->in($path);

            $iterator = $finder->getIterator();
            $iterator->next();

            return iterator_count($iterator) === 0;
        }

        return true;
    }
protected function isEmptyDir($path)
    {
        if ($this->fs->exists($path) === true) {
            $finder = new Finder();
            $finder->in($path);

            $iterator = $finder->getIterator();
            $iterator->next();

            return iterator_count($iterator) === 0;
        }

        return true;
    }
protected function isEmptyDir ( $ path ) { if ( $ this -> fs -> exists ( $ path ) === true ) { $ finder = new Finder ( ) ; $ finder -> in ( $ path ) ; $ iterator = $ finder -> getIterator ( ) ; $ iterator -> next ( ) ; return iterator_count ( $ iterator ) === 0 ; } return true ; }
Is the path empty?

@param string $path

@return bool
Is the path empty?