@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.
Files changed (2) hide show
  1. package/filesystem.js +5 -3
  2. 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
- return Finder.create().glob($pattern).find();
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ostro/filesystem",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "filesystem module for OstroJS",
5
5
  "main": "filesystemManager.js",
6
6
  "scripts": {