protected function getAllBasenames()
{
$path = $this->getPath();
try {
$collection = collect($this->files->directories($path));
$basenames = $collection->map(function ($item, $key) {
return basename($item);
});
return $basenames;
} catch (\InvalidArgumentException $e) {
return collect([]);
}
}