We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f314990 commit a2eeae6Copy full SHA for a2eeae6
src/FileListing/FileListing.php
@@ -17,10 +17,15 @@ public function __construct(Filesystem $filesystem)
17
$filesystem->addPlugin(new ListWith());
18
$listing = $filesystem->listWith(['timestamp'], null, true);
19
20
- $this->files = array_map(function($object) {
21
- return new File($object['path'], $object['timestamp']);
22
- }, $listing);
+ $this->files = [];
23
+ foreach ($listing as $object) {
+ if ($object['type'] !== 'file') {
24
+ continue;
25
+ }
26
+
27
+ $this->files[] = new File($object['path'], $object['timestamp']);
28
29
}
30
31
public function getFileByPath(string $path)
0 commit comments