From ea4f3ab852eba0eeb27004616163a0bbf9971215 Mon Sep 17 00:00:00 2001 From: Chris Knight Date: Sat, 14 Mar 2020 21:46:39 +0000 Subject: feat: add chmod Node polyfill and related file system constants (#4358) --- std/node/_fs/_fs_constants.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 std/node/_fs/_fs_constants.ts (limited to 'std/node/_fs/_fs_constants.ts') diff --git a/std/node/_fs/_fs_constants.ts b/std/node/_fs/_fs_constants.ts new file mode 100644 index 000000000..765e4af79 --- /dev/null +++ b/std/node/_fs/_fs_constants.ts @@ -0,0 +1,18 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. + +//File access constants +export const F_OK = 0; +export const R_OK = 4; +export const W_OK = 2; +export const X_OK = 1; + +//File mode constants +export const S_IRUSR = 0o400; //read by owner +export const S_IWUSR = 0o200; //write by owner +export const S_IXUSR = 0o100; //execute/search by owner +export const S_IRGRP = 0o40; //read by group +export const S_IWGRP = 0o20; //write by group +export const S_IXGRP = 0o10; //execute/search by group +export const S_IROTH = 0o4; //read by others +export const S_IWOTH = 0o2; //write by others +export const S_IXOTH = 0o1; //execute/search by others -- cgit v1.2.3