Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Events before Streams

  • Loading branch information...
commit d1b30bb3a22d9fe25beeb954ee58bc50fff124d6 1 parent 3333381
@tj tj authored
Showing with 25 additions and 1 deletion.
  1. +5 −0 .pomo
  2. +1 −1  Makefile
  3. +19 −0 src/process/umask.js
View
5 .pomo
@@ -89,3 +89,8 @@
description:
length: 25
name: error stack traces in es5
+- !ruby/object:Pomo::Task
+ complete: false
+ description:
+ length: 25
+ name: upate.. module.js is no more
View
2  Makefile
@@ -9,8 +9,8 @@ MD = pages/index.md \
chapters/installation.md \
chapters/modules.md \
chapters/globals.md \
- chapters/streams.md \
chapters/events.md \
+ chapters/streams.md \
chapters/fs.md \
chapters/tcp.md \
chapters/buffers.md \
View
19 src/process/umask.js
@@ -0,0 +1,19 @@
+
+function explainFlag(mode, flag) {
+ var classes = [];
+ if (mode & process['S_I' + flag + 'USR']) classes.push('user');
+ if (mode & process['S_I' + flag + 'GRP']) classes.push('group');
+ if (mode & process['S_I' + flag + 'OTH']) classes.push('other');
+ return classes.join(' ');
+}
+
+function explainMode(mode) {
+ console.log('\n mode: %s', mode.toString(8));
+ console.log(' read: %s', explainFlag(mode, 'R'));
+ console.log(' write: %s', explainFlag(mode, 'W'));
+ console.log(' exec: %s', explainFlag(mode, 'X'));
+}
+
+explainMode(0755);
+explainMode(0664);
+explainMode(process.umask());
Please sign in to comment.
Something went wrong with that request. Please try again.