in tools/node-hermes/InternalBindings/constants.cpp [174:355]
static jsi::Object systemConstants(jsi::Runtime &runtime) {
jsi::Object fsObject{runtime};
DEFINE_CONSTANT(fsObject, runtime, UV_FS_SYMLINK_DIR);
DEFINE_CONSTANT(fsObject, runtime, UV_FS_SYMLINK_JUNCTION);
// file access modes
DEFINE_CONSTANT(fsObject, runtime, O_RDONLY);
DEFINE_CONSTANT(fsObject, runtime, O_WRONLY);
DEFINE_CONSTANT(fsObject, runtime, O_RDWR);
// file types from readdir
DEFINE_CONSTANT(fsObject, runtime, UV_DIRENT_UNKNOWN);
DEFINE_CONSTANT(fsObject, runtime, UV_DIRENT_FILE);
DEFINE_CONSTANT(fsObject, runtime, UV_DIRENT_DIR);
DEFINE_CONSTANT(fsObject, runtime, UV_DIRENT_LINK);
DEFINE_CONSTANT(fsObject, runtime, UV_DIRENT_FIFO);
DEFINE_CONSTANT(fsObject, runtime, UV_DIRENT_SOCKET);
DEFINE_CONSTANT(fsObject, runtime, UV_DIRENT_CHAR);
DEFINE_CONSTANT(fsObject, runtime, UV_DIRENT_BLOCK);
DEFINE_CONSTANT(fsObject, runtime, S_IFMT);
DEFINE_CONSTANT(fsObject, runtime, S_IFREG);
DEFINE_CONSTANT(fsObject, runtime, S_IFDIR);
DEFINE_CONSTANT(fsObject, runtime, S_IFCHR);
#ifdef S_IFBLK
DEFINE_CONSTANT(fsObject, runtime, S_IFBLK);
#endif
#ifdef S_IFIFO
DEFINE_CONSTANT(fsObject, runtime, S_IFIFO);
#endif
#ifdef S_IFLNK
DEFINE_CONSTANT(fsObject, runtime, S_IFLNK);
#endif
#ifdef S_IFSOCK
DEFINE_CONSTANT(fsObject, runtime, S_IFSOCK);
#endif
#ifdef O_CREAT
DEFINE_CONSTANT(fsObject, runtime, O_CREAT);
#endif
#ifdef O_EXCL
DEFINE_CONSTANT(fsObject, runtime, O_EXCL);
#endif
#ifdef O_NOCTTY
DEFINE_CONSTANT(fsObject, runtime, O_NOCTTY);
#endif
#ifdef O_TRUNC
DEFINE_CONSTANT(fsObject, runtime, O_TRUNC);
#endif
#ifdef O_APPEND
DEFINE_CONSTANT(fsObject, runtime, O_APPEND);
#endif
#ifdef O_DIRECTORY
DEFINE_CONSTANT(fsObject, runtime, O_DIRECTORY);
#endif
#ifdef O_EXCL
DEFINE_CONSTANT(fsObject, runtime, O_EXCL);
#endif
#ifdef O_NOATIME
DEFINE_CONSTANT(fsObject, runtime, O_NOATIME);
#endif
#ifdef O_NOFOLLOW
DEFINE_CONSTANT(fsObject, runtime, O_NOFOLLOW);
#endif
#ifdef O_SYNC
DEFINE_CONSTANT(fsObject, runtime, O_SYNC);
#endif
#ifdef O_DSYNC
DEFINE_CONSTANT(fsObject, runtime, O_DSYNC);
#endif
#ifdef O_SYMLINK
DEFINE_CONSTANT(fsObject, runtime, O_SYMLINK);
#endif
#ifdef O_DIRECT
DEFINE_CONSTANT(fsObject, runtime, O_DIRECT);
#endif
#ifdef O_NONBLOCK
DEFINE_CONSTANT(fsObject, runtime, O_NONBLOCK);
#endif
#ifdef S_IRWXU
DEFINE_CONSTANT(fsObject, runtime, S_IRWXU);
#endif
#ifdef S_IRUSR
DEFINE_CONSTANT(fsObject, runtime, S_IRUSR);
#endif
#ifdef S_IWUSR
DEFINE_CONSTANT(fsObject, runtime, S_IWUSR);
#endif
#ifdef S_IXUSR
DEFINE_CONSTANT(fsObject, runtime, S_IXUSR);
#endif
#ifdef S_IRWXG
DEFINE_CONSTANT(fsObject, runtime, S_IRWXG);
#endif
#ifdef S_IRGRP
DEFINE_CONSTANT(fsObject, runtime, S_IRGRP);
#endif
#ifdef S_IWGRP
DEFINE_CONSTANT(fsObject, runtime, S_IWGRP);
#endif
#ifdef S_IXGRP
DEFINE_CONSTANT(fsObject, runtime, S_IXGRP);
#endif
#ifdef S_IRWXO
DEFINE_CONSTANT(fsObject, runtime, S_IRWXO);
#endif
#ifdef S_IROTH
DEFINE_CONSTANT(fsObject, runtime, S_IROTH);
#endif
#ifdef S_IWOTH
DEFINE_CONSTANT(fsObject, runtime, S_IWOTH);
#endif
#ifdef S_IXOTH
DEFINE_CONSTANT(fsObject, runtime, S_IXOTH);
#endif
#ifdef F_OK
DEFINE_CONSTANT(fsObject, runtime, F_OK);
#endif
#ifdef R_OK
DEFINE_CONSTANT(fsObject, runtime, R_OK);
#endif
#ifdef W_OK
DEFINE_CONSTANT(fsObject, runtime, W_OK);
#endif
#ifdef X_OK
DEFINE_CONSTANT(fsObject, runtime, X_OK);
#endif
#ifdef UV_FS_COPYFILE_EXCL
#define COPYFILE_EXCL UV_FS_COPYFILE_EXCL
DEFINE_CONSTANT(fsObject, runtime, UV_FS_COPYFILE_EXCL);
DEFINE_CONSTANT(fsObject, runtime, COPYFILE_EXCL);
#undef COPYFILE_EXCL
#endif
#ifdef UV_FS_COPYFILE_FICLONE
#define COPYFILE_FICLONE UV_FS_COPYFILE_FICLONE
DEFINE_CONSTANT(fsObject, runtime, UV_FS_COPYFILE_FICLONE);
DEFINE_CONSTANT(fsObject, runtime, COPYFILE_FICLONE);
#undef COPYFILE_FICLONE
#endif
#ifdef UV_FS_COPYFILE_FICLONE_FORCE
#define COPYFILE_FICLONE_FORCE UV_FS_COPYFILE_FICLONE_FORCE
DEFINE_CONSTANT(fsObject, runtime, UV_FS_COPYFILE_FICLONE_FORCE);
DEFINE_CONSTANT(fsObject, runtime, COPYFILE_FICLONE_FORCE);
#undef COPYFILE_FICLONE_FORCE
#endif
return fsObject;
}