Home > @microsoft/node-core-library > FileSystem > formatPosixModeBits

FileSystem.formatPosixModeBits() method

Returns a 10-character string representation of a PosixModeBits value similar to what would be displayed by a command such as “ls -l” on a POSIX-like operating system.

Signature:

static formatPosixModeBits(modeBits: PosixModeBits): string;

Parameters

Parameter Type Description
modeBits PosixModeBits POSIX-style file mode bits specified using the PosixModeBits enum

Returns:

string

Remarks

For example, PosixModeBits.AllRead | PosixModeBits.AllWrite would be formatted as “-rw-rw-rw-“.