Last active
March 2, 2022 17:37
-
-
Save srghma/88909d537e4e0df1b4297bbe29cc1e9a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var R = require('ramda') | |
console.log(R.sortBy(R.prop(1), Object.entries(require('fs').constants)).map(([key, value]) => `${value.toString(2).padStart(21, '~')} ${key}`).join('\n')) | |
~~~~~~~~~~~~~~~~~~~~0 O_RDONLY | |
~~~~~~~~~~~~~~~~~~~~0 UV_DIRENT_UNKNOWN | |
~~~~~~~~~~~~~~~~~~~~0 UV_FS_O_FILEMAP | |
~~~~~~~~~~~~~~~~~~~~0 F_OK | |
~~~~~~~~~~~~~~~~~~~~1 UV_FS_SYMLINK_DIR | |
~~~~~~~~~~~~~~~~~~~~1 O_WRONLY | |
~~~~~~~~~~~~~~~~~~~~1 UV_DIRENT_FILE | |
~~~~~~~~~~~~~~~~~~~~1 S_IXOTH | |
~~~~~~~~~~~~~~~~~~~~1 X_OK | |
~~~~~~~~~~~~~~~~~~~~1 UV_FS_COPYFILE_EXCL | |
~~~~~~~~~~~~~~~~~~~~1 COPYFILE_EXCL | |
~~~~~~~~~~~~~~~~~~~10 UV_FS_SYMLINK_JUNCTION | |
~~~~~~~~~~~~~~~~~~~10 O_RDWR | |
~~~~~~~~~~~~~~~~~~~10 UV_DIRENT_DIR | |
~~~~~~~~~~~~~~~~~~~10 S_IWOTH | |
~~~~~~~~~~~~~~~~~~~10 W_OK | |
~~~~~~~~~~~~~~~~~~~10 UV_FS_COPYFILE_FICLONE | |
~~~~~~~~~~~~~~~~~~~10 COPYFILE_FICLONE | |
~~~~~~~~~~~~~~~~~~~11 UV_DIRENT_LINK | |
~~~~~~~~~~~~~~~~~~100 UV_DIRENT_FIFO | |
~~~~~~~~~~~~~~~~~~100 S_IROTH | |
~~~~~~~~~~~~~~~~~~100 R_OK | |
~~~~~~~~~~~~~~~~~~100 UV_FS_COPYFILE_FICLONE_FORCE | |
~~~~~~~~~~~~~~~~~~100 COPYFILE_FICLONE_FORCE | |
~~~~~~~~~~~~~~~~~~101 UV_DIRENT_SOCKET | |
~~~~~~~~~~~~~~~~~~110 UV_DIRENT_CHAR | |
~~~~~~~~~~~~~~~~~~111 UV_DIRENT_BLOCK | |
~~~~~~~~~~~~~~~~~~111 S_IRWXO | |
~~~~~~~~~~~~~~~~~1000 S_IXGRP | |
~~~~~~~~~~~~~~~~10000 S_IWGRP | |
~~~~~~~~~~~~~~~100000 S_IRGRP | |
~~~~~~~~~~~~~~~111000 S_IRWXG | |
~~~~~~~~~~~~~~1000000 O_CREAT | |
~~~~~~~~~~~~~~1000000 S_IXUSR | |
~~~~~~~~~~~~~10000000 O_EXCL | |
~~~~~~~~~~~~~10000000 S_IWUSR | |
~~~~~~~~~~~~100000000 O_NOCTTY | |
~~~~~~~~~~~~100000000 S_IRUSR | |
~~~~~~~~~~~~111000000 S_IRWXU | |
~~~~~~~~~~~1000000000 O_TRUNC | |
~~~~~~~~~~10000000000 O_APPEND | |
~~~~~~~~~100000000000 O_NONBLOCK | |
~~~~~~~~1000000000000 S_IFIFO | |
~~~~~~~~1000000000000 O_DSYNC | |
~~~~~~~10000000000000 S_IFCHR | |
~~~~~~100000000000000 S_IFDIR | |
~~~~~~100000000000000 O_DIRECT | |
~~~~~~110000000000000 S_IFBLK | |
~~~~~1000000000000000 S_IFREG | |
~~~~~1010000000000000 S_IFLNK | |
~~~~~1100000000000000 S_IFSOCK | |
~~~~~1111000000000000 S_IFMT | |
~~~~10000000000000000 O_DIRECTORY | |
~~~100000000000000000 O_NOFOLLOW | |
~~~1000000000000000000 O_NOATIME | |
~100000001000000000000 O_SYNC | |
1000000000000000000000 | |
> (require('fs').constants["S_IFREG"] | require('fs').constants["S_IFLNK"]).toString('2') | |
'1010000000000000' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/nodejs/node/blob/b66a75a3a4361614dde9bc1a52d7e9021b4efc26/typings/internalBinding/constants.d.ts#L133