Debian Codegraph @

nodelib-fs-macchiato/out/dirent.js

raw
1 "use strict";
2 Object.defineProperty(exports, "__esModule", { value: true });
3 class Dirent {
4 constructor(_options = {}) {
5 var _a;
6 this._options = _options;
7 this.name = (_a = this._options.name) !== null && _a !== void 0 ? _a : 'unknown.txt';
8 }
9 isFile() {
10 var _a;
11 return (_a = this._options.isFile) !== null && _a !== void 0 ? _a : true;
12 }
13 isDirectory() {
14 var _a;
15 return (_a = this._options.isDirectory) !== null && _a !== void 0 ? _a : false;
16 }
17 isBlockDevice() {
18 var _a;
19 return (_a = this._options.isBlockDevice) !== null && _a !== void 0 ? _a : false;
20 }
21 isCharacterDevice() {
22 var _a;
23 return (_a = this._options.isCharacterDevice) !== null && _a !== void 0 ? _a : false;
24 }
25 isSymbolicLink() {
26 var _a;
27 return (_a = this._options.isSymbolicLink) !== null && _a !== void 0 ? _a : false;
28 }
29 isFIFO() {
30 var _a;
31 return (_a = this._options.isFIFO) !== null && _a !== void 0 ? _a : false;
32 }
33 isSocket() {
34 var _a;
35 return (_a = this._options.isSocket) !== null && _a !== void 0 ? _a : false;
36 }
37 }
38 exports.default = Dirent;