mirror of
https://github.com/denoland/deno.git
synced 2025-07-23 05:05:08 +00:00
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.
This commit is contained in:
parent
721a4ad59d
commit
3e6ea62841
14 changed files with 193 additions and 206 deletions
5
cli/js/lib.deno.ns.d.ts
vendored
5
cli/js/lib.deno.ns.d.ts
vendored
|
@ -1386,8 +1386,11 @@ declare namespace Deno {
|
|||
* Requires `allow-read` permission. */
|
||||
export function realpath(path: string): Promise<string>;
|
||||
|
||||
export interface DirEntry extends FileInfo {
|
||||
export interface DirEntry {
|
||||
name: string;
|
||||
isFile: boolean;
|
||||
isDirectory: boolean;
|
||||
isSymlink: boolean;
|
||||
}
|
||||
|
||||
/** Synchronously reads the directory given by `path` and returns an iterable
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue