Skip to content

Add stat mode type constants to Fuse export#24

Open
glmdev wants to merge 1 commit into
fuse-friends:masterfrom
glmdev:patch-1
Open

Add stat mode type constants to Fuse export#24
glmdev wants to merge 1 commit into
fuse-friends:masterfrom
glmdev:patch-1

Conversation

@glmdev
Copy link
Copy Markdown

@glmdev glmdev commented Nov 27, 2020

sys/stat.h contains bitwise constants for the various stat modes (directory, symlink, &c) that would be useful to have available as constants in Node.

From the spec: https://pubs.opengroup.org/onlinepubs/007908799/xsh/sysstat.h.html

sys/stat.h contains bitwise constants for the various stat modes (directory, symlink, &c) that would be useful to have available as constants in Node.

From the spec: https://pubs.opengroup.org/onlinepubs/007908799/xsh/sysstat.h.html
Comment thread index.js
Fuse.S_IFIFO = 4096
Fuse.S_IFREG = 32768
Fuse.S_IFDIR = 16384
Fuse.S_IFLNK = 40960
Copy link
Copy Markdown

@CreativeCactus CreativeCactus Apr 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest using binary or shift notation:
16384 becomes 0b100000000000000 or 1<<14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants