chore: generate
This commit is contained in:
@@ -61,10 +61,12 @@ export namespace AppFileSystem {
|
|||||||
return yield* Effect.tryPromise({
|
return yield* Effect.tryPromise({
|
||||||
try: async () => {
|
try: async () => {
|
||||||
const entries = await NFS.readdir(dirPath, { withFileTypes: true })
|
const entries = await NFS.readdir(dirPath, { withFileTypes: true })
|
||||||
return entries.map((e): DirEntry => ({
|
return entries.map(
|
||||||
name: e.name,
|
(e): DirEntry => ({
|
||||||
type: e.isDirectory() ? "directory" : e.isSymbolicLink() ? "symlink" : e.isFile() ? "file" : "other",
|
name: e.name,
|
||||||
}))
|
type: e.isDirectory() ? "directory" : e.isSymbolicLink() ? "symlink" : e.isFile() ? "file" : "other",
|
||||||
|
}),
|
||||||
|
)
|
||||||
},
|
},
|
||||||
catch: (cause) => new FileSystemError({ method: "readDirectoryEntries", cause }),
|
catch: (cause) => new FileSystemError({ method: "readDirectoryEntries", cause }),
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user