@gesslar/toolkit 0.1.2 → 0.1.3
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/README.md +1 -1
- package/package.json +1 -1
- package/src/lib/DirectoryObject.js +3 -4
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -209,18 +209,17 @@ export default class DirectoryObject extends FS {
|
|
|
209
209
|
/**
|
|
210
210
|
* Lists the contents of a directory.
|
|
211
211
|
*
|
|
212
|
-
* @param {DirectoryObject} directory - The directory to list.
|
|
213
212
|
* @returns {Promise<{files: Array<FileObject>, directories: Array<DirectoryObject>}>} The files and directories in the directory.
|
|
214
213
|
*/
|
|
215
|
-
async read(
|
|
214
|
+
async read() {
|
|
216
215
|
const found = await fs.readdir(
|
|
217
|
-
new URL(
|
|
216
|
+
new URL(this.uri),
|
|
218
217
|
{withFileTypes: true}
|
|
219
218
|
)
|
|
220
219
|
|
|
221
220
|
const results = await Promise.all(
|
|
222
221
|
found.map(async dirent => {
|
|
223
|
-
const fullPath = path.join(
|
|
222
|
+
const fullPath = path.join(this.path, dirent.name)
|
|
224
223
|
const stat = await fs.stat(fullPath)
|
|
225
224
|
|
|
226
225
|
return {dirent, stat, fullPath}
|