diff options
author | Bert Belder <bertbelder@gmail.com> | 2020-04-29 22:00:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-29 16:00:31 -0400 |
commit | 3e6ea6284178df0be4982d9775f47b47b14c6139 (patch) | |
tree | ed684ea536e32023e72004110556ad8285126676 /std/node/_fs/_fs_dirent.ts | |
parent | 721a4ad59d4a8bdd8470d6b98839137f14c84ba9 (diff) |
BREAKING: Include limited metadata in 'DirEntry' objects (#4941)
This change is to prevent needed a separate stat syscall for each file
when using readdir.
For consistency, this PR also modifies std's `WalkEntry` interface to
extend `DirEntry` with an additional `path` field.
Diffstat (limited to 'std/node/_fs/_fs_dirent.ts')
-rw-r--r-- | std/node/_fs/_fs_dirent.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/std/node/_fs/_fs_dirent.ts b/std/node/_fs/_fs_dirent.ts index 55fbad142..3ea1def42 100644 --- a/std/node/_fs/_fs_dirent.ts +++ b/std/node/_fs/_fs_dirent.ts @@ -4,11 +4,15 @@ export default class Dirent { constructor(private entry: Deno.DirEntry) {} isBlockDevice(): boolean { - return this.entry.blocks != null; + notImplemented("Deno does not yet support identification of block devices"); + return false; } isCharacterDevice(): boolean { - return this.entry.blocks == null; + notImplemented( + "Deno does not yet support identification of character devices" + ); + return false; } isDirectory(): boolean { |