15815213711
2024-08-26 67b8b6731811983447e053d4396b3708c14dfe3c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/// <reference types="node" />
import { Stats } from 'fs';
declare function createMode(stat?: number | createMode.StatsMode): createMode.Mode;
declare namespace createMode {
    type StatsMode = Pick<Stats, 'mode'>;
    function isStatsMode(v: any): v is StatsMode;
    class RWX {
        protected static r: number;
        protected static w: number;
        protected static x: number;
        private stat;
        constructor(stat: StatsMode);
        get read(): boolean;
        set read(v: boolean);
        get write(): boolean;
        set write(v: boolean);
        get execute(): boolean;
        set execute(v: boolean);
    }
    class Owner extends RWX {
        protected static r: number;
        protected static w: number;
        protected static x: number;
    }
    class Group extends RWX {
        protected static r: number;
        protected static w: number;
        protected static x: number;
    }
    class Others extends RWX {
        protected static r: number;
        protected static w: number;
        protected static x: number;
    }
    class Mode {
        owner: Owner;
        group: Group;
        others: Others;
        private stat;
        constructor(stat?: number | StatsMode);
        private checkModeProperty;
        isDirectory(v?: boolean): boolean;
        isFile(v?: boolean): boolean;
        isBlockDevice(v?: boolean): boolean;
        isCharacterDevice(v?: boolean): boolean;
        isSymbolicLink(v?: boolean): boolean;
        isFIFO(v?: boolean): boolean;
        isSocket(v?: boolean): boolean;
        /**
         * Returns an octal representation of the `mode`, eg. "0754".
         *
         * http://en.wikipedia.org/wiki/File_system_permissions#Numeric_notation
         *
         * @return {String}
         * @api public
         */
        toOctal(): 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
         *
         * @return {String}
         * @api public
         */
        toString(): string;
        valueOf(): number;
        get setuid(): boolean;
        set setuid(v: boolean);
        get setgid(): boolean;
        set setgid(v: boolean);
        get sticky(): boolean;
        set sticky(v: boolean);
    }
}
export = createMode;