mirror of
https://github.com/denoland/deno.git
synced 2025-07-29 16:13:54 +00:00
[fs] Enable mode for mkdir
on unix (#746)
This commit is contained in:
parent
66c09de967
commit
662e57b20a
5 changed files with 36 additions and 15 deletions
|
@ -9,6 +9,15 @@ testPerm({ write: true }, function mkdirSyncSuccess() {
|
|||
assert(pathInfo.isDirectory());
|
||||
});
|
||||
|
||||
testPerm({ write: true }, function mkdirSyncMode() {
|
||||
const path = deno.makeTempDirSync() + "/dir/subdir";
|
||||
deno.mkdirSync(path, 0o755); // no perm for x
|
||||
const pathInfo = deno.statSync(path);
|
||||
if (pathInfo.mode !== null) { // Skip windows
|
||||
assertEqual(pathInfo.mode & 0o777, 0o755);
|
||||
}
|
||||
});
|
||||
|
||||
testPerm({ write: false }, function mkdirSyncPerm() {
|
||||
let err;
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue