mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 17:34:47 -05:00
readDir entry mode (#1326)
This commit is contained in:
parent
a8c3b44804
commit
585de35b1d
2 changed files with 3 additions and 0 deletions
|
@ -14,6 +14,7 @@ function assertSameContent(files: FileInfo[]) {
|
||||||
|
|
||||||
if (file.name === "002_hello.ts") {
|
if (file.name === "002_hello.ts") {
|
||||||
assertEqual(file.path, `tests/${file.name}`);
|
assertEqual(file.path, `tests/${file.name}`);
|
||||||
|
assertEqual(file.mode!, deno.statSync(`tests/${file.name}`).mode!);
|
||||||
counter++;
|
counter++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -945,6 +945,8 @@ fn op_read_dir(
|
||||||
created: to_seconds!(metadata.created()),
|
created: to_seconds!(metadata.created()),
|
||||||
name: Some(name),
|
name: Some(name),
|
||||||
path: Some(path),
|
path: Some(path),
|
||||||
|
mode: get_mode(&metadata.permissions()),
|
||||||
|
has_mode: cfg!(target_family = "unix"),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue