1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-18 11:53:59 -05:00

readDir entry mode (#1326)

This commit is contained in:
Kevin (Kun) "Kassimo" Qian 2018-12-12 02:31:18 -05:00 committed by Ryan Dahl
parent a8c3b44804
commit 585de35b1d
2 changed files with 3 additions and 0 deletions

View file

@ -14,6 +14,7 @@ function assertSameContent(files: FileInfo[]) {
if (file.name === "002_hello.ts") {
assertEqual(file.path, `tests/${file.name}`);
assertEqual(file.mode!, deno.statSync(`tests/${file.name}`).mode!);
counter++;
}
}

View file

@ -945,6 +945,8 @@ fn op_read_dir(
created: to_seconds!(metadata.created()),
name: Some(name),
path: Some(path),
mode: get_mode(&metadata.permissions()),
has_mode: cfg!(target_family = "unix"),
..Default::default()
},
)