RoadmapShopEvents
Skip to main content

Home > @rushstack/node-core-library > PosixModeBits

PosixModeBits enum

An integer value used to specify file permissions for POSIX-like operating systems.

Signature:
export declare enum PosixModeBits

Enumeration Members

MemberValueDescription
AllExecute73An alias combining OthersExecute, GroupExecute, and UserExecute permission bits.
AllRead292An alias combining OthersRead, GroupRead, and UserRead permission bits.
AllWrite146An alias combining OthersWrite, GroupWrite, and UserWrite permission bits.
GroupExecute8Indicates that users belonging to the item's group can execute the item (if it is a file) or search the item (if it is a directory).
GroupRead32Indicates that users belonging to the item's group can read the item.
GroupWrite16Indicates that users belonging to the item's group can modify the item.
None0A zero value where no permissions bits are set.
OthersExecute1Indicates that other users (besides the item's owner user or group) can execute the item (if it is a file) or search the item (if it is a directory).
OthersRead4Indicates that other users (besides the item's owner user or group) can read the item.
OthersWrite2Indicates that other users (besides the item's owner user or group) can modify the item.
UserExecute64Indicates that the item's owner can execute the item (if it is a file) or search the item (if it is a directory).
UserRead256Indicates that the item's owner can read the item.
UserWrite128Indicates that the item's owner can modify the item.

Remarks

This bitfield corresponds to the "mode_t" structure described in this document: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys\_stat.h.html

It is used with NodeJS APIs such as fs.Stat.mode and fs.chmodSync(). These values represent a set of permissions and can be combined using bitwise arithmetic.

POSIX is a registered trademark of the Institute of Electrical and Electronic Engineers, Inc.