stat-mode

  • Version 1.0.0
  • Published
  • 25.7 kB
  • No dependencies
  • MIT license

Install

npm i stat-mode
yarn add stat-mode
pnpm add stat-mode

Overview

Offers convenient getters and setters for the stat `mode`

Index

Functions

function createMode

createMode: typeof createMode;

    function isStatsMode

    isStatsMode: (v: any) => v is StatsMode;

      Classes

      class Group

      class Group extends RWX {}

        property r

        protected static r: number;

          property w

          protected static w: number;

            property x

            protected static x: number;

              class Mode

              class Mode {}

                constructor

                constructor(stat?: number | StatsMode);

                  property group

                  group: Group;

                    property others

                    others: Others;

                      property owner

                      owner: Owner;

                        property setgid

                        setgid: boolean;

                          property setuid

                          setuid: boolean;

                            property sticky

                            sticky: boolean;

                              method isBlockDevice

                              isBlockDevice: (v?: boolean) => boolean;

                                method isCharacterDevice

                                isCharacterDevice: (v?: boolean) => boolean;

                                  method isDirectory

                                  isDirectory: (v?: boolean) => boolean;

                                    method isFIFO

                                    isFIFO: (v?: boolean) => boolean;

                                      method isFile

                                      isFile: (v?: boolean) => boolean;

                                        method isSocket

                                        isSocket: (v?: boolean) => boolean;
                                          isSymbolicLink: (v?: boolean) => boolean;

                                            method toOctal

                                            toOctal: () => string;
                                            • Returns an octal representation of the mode, eg. "0754".

                                              http://en.wikipedia.org/wiki/File_system_permissions#Numeric_notation

                                              {String} public

                                            method toString

                                            toString: () => string;
                                            • Returns a String representation of the mode. The output resembles something similar to what ls -l would output.

                                              http://en.wikipedia.org/wiki/Unix_file_types

                                              {String} public

                                            method valueOf

                                            valueOf: () => number;

                                              class Others

                                              class Others extends RWX {}

                                                property r

                                                protected static r: number;

                                                  property w

                                                  protected static w: number;

                                                    property x

                                                    protected static x: number;

                                                      class Owner

                                                      class Owner extends RWX {}

                                                        property r

                                                        protected static r: number;

                                                          property w

                                                          protected static w: number;

                                                            property x

                                                            protected static x: number;

                                                              class RWX

                                                              class RWX {}

                                                                constructor

                                                                constructor(stat: StatsMode);

                                                                  property execute

                                                                  execute: boolean;

                                                                    property r

                                                                    protected static r: number;

                                                                      property read

                                                                      read: boolean;

                                                                        property w

                                                                        protected static w: number;

                                                                          property write

                                                                          write: boolean;

                                                                            property x

                                                                            protected static x: number;

                                                                              Type Aliases

                                                                              type StatsMode

                                                                              type StatsMode = Pick<Stats, 'mode'>;

                                                                                Package Files (1)

                                                                                Dependencies (0)

                                                                                No dependencies.

                                                                                Dev Dependencies (17)

                                                                                Peer Dependencies (0)

                                                                                No peer dependencies.

                                                                                Badge

                                                                                To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/stat-mode.

                                                                                • Markdown
                                                                                  [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/stat-mode)
                                                                                • HTML
                                                                                  <a href="https://www.jsdocs.io/package/stat-mode"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>