Skip to content

Commit

Permalink
readDir entry mode (denoland#1326)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinkassimo authored and ry committed Dec 12, 2018
1 parent a8c3b44 commit 585de35
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions js/read_dir_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
},
)
Expand Down

0 comments on commit 585de35

Please sign in to comment.