@ostro/filesystem 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/filesystem.js +5 -3
- package/package.json +1 -1
package/filesystem.js
CHANGED
|
@@ -136,8 +136,10 @@ class Filesystem extends FilesystemContract {
|
|
|
136
136
|
return fs.lstat($file).then(stats => stats.isFile()).catch(err => false);
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
-
glob($pattern) {
|
|
140
|
-
|
|
139
|
+
async glob($pattern) {
|
|
140
|
+
const dir = path.dirname($pattern);
|
|
141
|
+
const base = path.basename($pattern);
|
|
142
|
+
return Finder.create().path(dir).glob(base || "*").find()
|
|
141
143
|
}
|
|
142
144
|
|
|
143
145
|
requireOnce($path, $data = []) {
|
|
@@ -274,4 +276,4 @@ class Filesystem extends FilesystemContract {
|
|
|
274
276
|
return this.deleteDirectory($directory, true);
|
|
275
277
|
}
|
|
276
278
|
}
|
|
277
|
-
module.exports = Filesystem
|
|
279
|
+
module.exports = Filesystem
|