We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d9b32b6 commit 26b6b2aCopy full SHA for 26b6b2a
src/Support/FileFinder.php
@@ -39,14 +39,24 @@ private static function separateDirectoriesAndFiles(array $paths): array
39
if (! str_starts_with($path, DIRECTORY_SEPARATOR)) {
40
$path = getcwd().DIRECTORY_SEPARATOR.$path;
41
}
42
+
43
+ if (str_contains($path, '*')) {
44
+ $expanded = glob($path, GLOB_ONLYDIR);
45
+ if ($expanded !== false) {
46
+ $dirs = [...$dirs, ...$expanded];
47
+ }
48
49
+ continue;
50
51
52
if (is_dir($path)) {
53
$dirs[] = $path;
54
} elseif (is_file($path)) {
55
$file = new \SplFileInfo($path);
56
$files[] = new SplFileInfo($file->getPathname(), $file->getPath(), $file->getFilename());
57
58
-
59
60
return ['directories' => $dirs, 'files' => $files];
61
62
0 commit comments