src/Database/Attach/Media.php
protected function isDirectoryEmpty($directory)
    {
        $path = $this->getStorageDisk()->path($directory);
        return !(new FilesystemIterator($path))->valid();
    }
protected function isDirectoryEmpty($directory)
    {
        $path = $this->getStorageDisk()->path($directory);
        return !(new FilesystemIterator($path))->valid();
    }
Returns true if a directory contains no files.
@param $directory
@return bool|null