@aitianyu.cn/types 0.0.13 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/{utilities/coding → coding}/Error.js +44 -44
- package/dist/lib/{utilities/coding → coding}/Path.js +210 -198
- package/dist/lib/{utilities/core → core}/Errors.js +86 -86
- package/dist/lib/{utilities/core → core}/Language.js +561 -559
- package/dist/lib/{utilities/core → core}/Log.js +112 -108
- package/dist/lib/{utilities/core → core}/TypeConvertion.js +25 -25
- package/dist/lib/{utilities/core → core}/interface/ITJSON.js +3 -3
- package/dist/lib/{utilities/core → core}/interface/ITianyuType.js +3 -3
- package/dist/lib/{utilities/core → core}/object/ArrayHelper.js +35 -35
- package/dist/lib/core/object/Bytes.js +21 -0
- package/dist/lib/{utilities/core → core}/object/Calculater.js +240 -230
- package/dist/lib/core/object/DataView.js +23 -0
- package/dist/lib/core/object/Integer.js +117 -0
- package/dist/lib/core/object/Json.js +35 -0
- package/dist/lib/{utilities/core/object/Helper.js → core/object/ObjectHelper.js} +202 -201
- package/dist/lib/core/object/StringHelper.js +61 -0
- package/dist/lib/{utilities/core → core}/type/TArray.js +8 -7
- package/dist/lib/{utilities/core → core}/type/TBoolean.js +7 -7
- package/dist/lib/{utilities/core → core}/type/TJSON.js +7 -7
- package/dist/lib/{utilities/core → core}/type/TNumber.js +7 -7
- package/dist/lib/{utilities/core → core}/type/TObject.js +7 -7
- package/dist/lib/{utilities/core → core}/type/TString.js +7 -7
- package/dist/lib/index.js +70 -54
- package/dist/lib/security/Base32.js +104 -0
- package/dist/lib/security/Guid.js +26 -0
- package/dist/lib/{utilities/security → security}/Hash.js +16 -15
- package/dist/lib/security/QRCode.js +46 -0
- package/dist/lib/security/RSA.js +62 -0
- package/dist/lib/security/SHA.js +67 -0
- package/dist/lib/types/AreaCode.js +269 -269
- package/dist/lib/types/Exception.js +19 -19
- package/dist/lib/types/Logs.js +20 -20
- package/dist/lib/types/Object.js +3 -3
- package/dist/lib/types/PathBase.js +109 -109
- package/dist/lib/types/Security.js +10 -10
- package/dist/lib/types/TMap.js +139 -138
- package/dist/lib/types/Types.js +3 -3
- package/dist/lib/types/index.js +17 -17
- package/dist/types/{utilities/coding → coding}/Error.d.ts +27 -27
- package/dist/types/{utilities/coding → coding}/Path.d.ts +61 -61
- package/dist/types/{utilities/core → core}/Errors.d.ts +47 -47
- package/dist/types/{utilities/core → core}/Language.d.ts +17 -17
- package/dist/types/{utilities/core → core}/Log.d.ts +12 -12
- package/dist/types/{utilities/core → core}/TypeConvertion.d.ts +2 -2
- package/dist/types/{utilities/core → core}/interface/ITJSON.d.ts +5 -5
- package/dist/types/{utilities/core → core}/interface/ITianyuType.d.ts +5 -5
- package/dist/types/{utilities/core → core}/object/ArrayHelper.d.ts +11 -11
- package/dist/types/core/object/Bytes.d.ts +13 -0
- package/dist/types/{utilities/core → core}/object/Calculater.d.ts +22 -22
- package/dist/types/core/object/DataView.d.ts +11 -0
- package/dist/types/core/object/Integer.d.ts +71 -0
- package/dist/types/core/object/Json.d.ts +22 -0
- package/dist/types/{utilities/core/object/Helper.d.ts → core/object/ObjectHelper.d.ts} +39 -39
- package/dist/types/core/object/StringHelper.d.ts +21 -0
- package/dist/types/{utilities/core → core}/type/TArray.d.ts +3 -3
- package/dist/types/{utilities/core → core}/type/TBoolean.d.ts +3 -3
- package/dist/types/{utilities/core → core}/type/TJSON.d.ts +3 -3
- package/dist/types/{utilities/core → core}/type/TNumber.d.ts +3 -3
- package/dist/types/{utilities/core → core}/type/TObject.d.ts +3 -3
- package/dist/types/{utilities/core → core}/type/TString.d.ts +3 -3
- package/dist/types/index.d.ts +29 -21
- package/dist/types/security/Base32.d.ts +42 -0
- package/dist/types/security/Guid.d.ts +4 -0
- package/dist/types/{utilities/security → security}/Hash.d.ts +3 -3
- package/dist/types/security/QRCode.d.ts +11 -0
- package/dist/types/security/RSA.d.ts +68 -0
- package/dist/types/security/SHA.d.ts +40 -0
- package/dist/types/types/AreaCode.d.ts +135 -135
- package/dist/types/types/Exception.d.ts +11 -11
- package/dist/types/types/Logs.d.ts +64 -64
- package/dist/types/types/Object.d.ts +18 -18
- package/dist/types/types/PathBase.d.ts +76 -76
- package/dist/types/types/Security.d.ts +23 -23
- package/dist/types/types/TMap.d.ts +80 -80
- package/dist/types/types/Types.d.ts +25 -25
- package/dist/types/types/index.d.ts +9 -9
- package/package.json +57 -51
- package/dist/lib/utilities/coding/index.js +0 -10
- package/dist/lib/utilities/core/index.js +0 -21
- package/dist/lib/utilities/core/object/StringHelper.js +0 -22
- package/dist/lib/utilities/security/Guid.js +0 -20
- package/dist/lib/utilities/security/index.js +0 -8
- package/dist/types/utilities/coding/index.d.ts +0 -3
- package/dist/types/utilities/core/index.d.ts +0 -6
- package/dist/types/utilities/core/object/StringHelper.d.ts +0 -4
- package/dist/types/utilities/security/Guid.d.ts +0 -3
- package/dist/types/utilities/security/index.d.ts +0 -3
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**@format */
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.PathDirAndFileConvertInvaild = exports.PathDirectoryValidationFailException = exports.PathProcessorSourceLostException = void 0;
|
|
5
|
-
const Exception_1 = require("
|
|
6
|
-
/**
|
|
7
|
-
* Source lost exception of Path Processor.
|
|
8
|
-
* Exception will be thrown if the path is file but the file field is not specified
|
|
9
|
-
*/
|
|
10
|
-
class PathProcessorSourceLostException extends Exception_1.Exception {
|
|
11
|
-
constructor(msg) {
|
|
12
|
-
super(msg);
|
|
13
|
-
}
|
|
14
|
-
toString() {
|
|
15
|
-
return `路径处理器 - 指定的参数 ( path.file ) 为空`;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
exports.PathProcessorSourceLostException = PathProcessorSourceLostException;
|
|
19
|
-
/**
|
|
20
|
-
* Path directory name is not valid.
|
|
21
|
-
* Exception will be thrown if the path name has the invalid char
|
|
22
|
-
*/
|
|
23
|
-
class PathDirectoryValidationFailException extends Exception_1.Exception {
|
|
24
|
-
constructor(msg) {
|
|
25
|
-
super(msg);
|
|
26
|
-
}
|
|
27
|
-
toString() {
|
|
28
|
-
return `路径处理器 - 指定的路径目录 ( ${this.message} ) 无效`;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
exports.PathDirectoryValidationFailException = PathDirectoryValidationFailException;
|
|
32
|
-
/**
|
|
33
|
-
* Path is file or directory but target type is not.
|
|
34
|
-
* Exception will be thrown if the path is file(directory) but try to convert to directory(file)
|
|
35
|
-
*/
|
|
36
|
-
class PathDirAndFileConvertInvaild extends Exception_1.Exception {
|
|
37
|
-
constructor(path, type) {
|
|
38
|
-
super(`${path} 为 ${type === "directory" ? "目录" : "文件"}`);
|
|
39
|
-
}
|
|
40
|
-
toString() {
|
|
41
|
-
return `路径处理器 - 不能将文件与目录相互转换 ( ${this.message} ) `;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
exports.PathDirAndFileConvertInvaild = PathDirAndFileConvertInvaild;
|
|
1
|
+
"use strict";
|
|
2
|
+
/**@format */
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.PathDirAndFileConvertInvaild = exports.PathDirectoryValidationFailException = exports.PathProcessorSourceLostException = void 0;
|
|
5
|
+
const Exception_1 = require("../types/Exception");
|
|
6
|
+
/**
|
|
7
|
+
* Source lost exception of Path Processor.
|
|
8
|
+
* Exception will be thrown if the path is file but the file field is not specified
|
|
9
|
+
*/
|
|
10
|
+
class PathProcessorSourceLostException extends Exception_1.Exception {
|
|
11
|
+
constructor(msg) {
|
|
12
|
+
super(msg);
|
|
13
|
+
}
|
|
14
|
+
toString() {
|
|
15
|
+
return `路径处理器 - 指定的参数 ( path.file ) 为空`;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.PathProcessorSourceLostException = PathProcessorSourceLostException;
|
|
19
|
+
/**
|
|
20
|
+
* Path directory name is not valid.
|
|
21
|
+
* Exception will be thrown if the path name has the invalid char
|
|
22
|
+
*/
|
|
23
|
+
class PathDirectoryValidationFailException extends Exception_1.Exception {
|
|
24
|
+
constructor(msg) {
|
|
25
|
+
super(msg);
|
|
26
|
+
}
|
|
27
|
+
toString() {
|
|
28
|
+
return `路径处理器 - 指定的路径目录 ( ${this.message} ) 无效`;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.PathDirectoryValidationFailException = PathDirectoryValidationFailException;
|
|
32
|
+
/**
|
|
33
|
+
* Path is file or directory but target type is not.
|
|
34
|
+
* Exception will be thrown if the path is file(directory) but try to convert to directory(file)
|
|
35
|
+
*/
|
|
36
|
+
class PathDirAndFileConvertInvaild extends Exception_1.Exception {
|
|
37
|
+
constructor(path, type) {
|
|
38
|
+
super(`${path} 为 ${type === "directory" ? "目录" : "文件"}`);
|
|
39
|
+
}
|
|
40
|
+
toString() {
|
|
41
|
+
return `路径处理器 - 不能将文件与目录相互转换 ( ${this.message} ) `;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.PathDirAndFileConvertInvaild = PathDirAndFileConvertInvaild;
|
|
@@ -1,198 +1,210 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**@format */
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Path = void 0;
|
|
5
|
-
const PathBase_1 = require("
|
|
6
|
-
const Error_1 = require("./Error");
|
|
7
|
-
const __charInDirValidation = {
|
|
8
|
-
"/": { file: false, dir: false },
|
|
9
|
-
".": { file: true, dir: false },
|
|
10
|
-
};
|
|
11
|
-
function _dirNameChecker(dir) {
|
|
12
|
-
if (!dir)
|
|
13
|
-
return "drop";
|
|
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
|
-
const
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
/**@format */
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Path = void 0;
|
|
5
|
+
const PathBase_1 = require("../types/PathBase");
|
|
6
|
+
const Error_1 = require("./Error");
|
|
7
|
+
const __charInDirValidation = {
|
|
8
|
+
"/": { file: false, dir: false },
|
|
9
|
+
".": { file: true, dir: false },
|
|
10
|
+
};
|
|
11
|
+
function _dirNameChecker(dir) {
|
|
12
|
+
if (!dir) {
|
|
13
|
+
return "drop";
|
|
14
|
+
}
|
|
15
|
+
for (const ch of dir) {
|
|
16
|
+
const validation = __charInDirValidation[ch];
|
|
17
|
+
if (validation && !validation.dir) {
|
|
18
|
+
return "invalid";
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return "valid";
|
|
22
|
+
}
|
|
23
|
+
function _dirFileTypeChecker(src) {
|
|
24
|
+
if (!src) {
|
|
25
|
+
return "drop";
|
|
26
|
+
}
|
|
27
|
+
let dirType = false;
|
|
28
|
+
let fileType = false;
|
|
29
|
+
for (const char of src) {
|
|
30
|
+
const validation = __charInDirValidation[char];
|
|
31
|
+
if (dirType) {
|
|
32
|
+
if (validation && !validation.dir) {
|
|
33
|
+
return "invalid";
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
else if (fileType) {
|
|
37
|
+
if (validation && !validation.file) {
|
|
38
|
+
return "invalid";
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
if (validation) {
|
|
43
|
+
if (validation.dir && !validation.file) {
|
|
44
|
+
dirType = true;
|
|
45
|
+
}
|
|
46
|
+
else if (!validation.dir && validation.file) {
|
|
47
|
+
fileType = true;
|
|
48
|
+
}
|
|
49
|
+
else if (!validation.dir && !validation.file) {
|
|
50
|
+
return "invalid";
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
if ((!dirType && !fileType) || dirType) {
|
|
56
|
+
return "directory";
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
return "file";
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
function _parsePathFromString(src) {
|
|
63
|
+
const path = {
|
|
64
|
+
dirs: [],
|
|
65
|
+
file: undefined,
|
|
66
|
+
type: "directory",
|
|
67
|
+
};
|
|
68
|
+
if (!src) {
|
|
69
|
+
return path;
|
|
70
|
+
}
|
|
71
|
+
const prsedSrc = src.trim();
|
|
72
|
+
const srcSplit = prsedSrc.split("/");
|
|
73
|
+
if (srcSplit.length === 0) {
|
|
74
|
+
return path;
|
|
75
|
+
}
|
|
76
|
+
for (let i = 0; i < srcSplit.length - 1; ++i) {
|
|
77
|
+
const dir = srcSplit[i];
|
|
78
|
+
const validation = _dirNameChecker(dir);
|
|
79
|
+
if (validation === "invalid") {
|
|
80
|
+
throw new Error_1.PathDirectoryValidationFailException(dir);
|
|
81
|
+
}
|
|
82
|
+
if (validation === "valid") {
|
|
83
|
+
path.dirs.push(dir);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
const lastDir = srcSplit[srcSplit.length - 1];
|
|
87
|
+
const dirType = _dirFileTypeChecker(lastDir);
|
|
88
|
+
if (dirType === "directory") {
|
|
89
|
+
path.dirs.push(lastDir);
|
|
90
|
+
}
|
|
91
|
+
else if (dirType === "file") {
|
|
92
|
+
path.file = lastDir;
|
|
93
|
+
path.type = "file";
|
|
94
|
+
}
|
|
95
|
+
return path;
|
|
96
|
+
}
|
|
97
|
+
/** Path */
|
|
98
|
+
class Path extends PathBase_1.PathBase {
|
|
99
|
+
_type;
|
|
100
|
+
_file;
|
|
101
|
+
/**
|
|
102
|
+
* Create a new Path instance
|
|
103
|
+
*
|
|
104
|
+
* @param dirs the directory names
|
|
105
|
+
* @param type indicate which type the Path is
|
|
106
|
+
* @param file the file name if the type is file
|
|
107
|
+
*/
|
|
108
|
+
constructor(dirs, type, file) {
|
|
109
|
+
super();
|
|
110
|
+
let actType = type;
|
|
111
|
+
let actFile = file;
|
|
112
|
+
if (typeof dirs === "string") {
|
|
113
|
+
const parsePath = _parsePathFromString(dirs);
|
|
114
|
+
if (type && type !== parsePath.type) {
|
|
115
|
+
throw new Error_1.PathDirAndFileConvertInvaild(dirs, parsePath.type);
|
|
116
|
+
}
|
|
117
|
+
this._dirs = parsePath.dirs;
|
|
118
|
+
actType = parsePath.type;
|
|
119
|
+
actFile = parsePath.file;
|
|
120
|
+
}
|
|
121
|
+
else if (Array.isArray(dirs)) {
|
|
122
|
+
this._dirs = dirs;
|
|
123
|
+
}
|
|
124
|
+
this._type = actType || (actFile && "file") || "directory";
|
|
125
|
+
this._file = actFile;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Convert the path to a string
|
|
129
|
+
*
|
|
130
|
+
* @returns return the string
|
|
131
|
+
*/
|
|
132
|
+
toString() {
|
|
133
|
+
if (this.getType() === "file" && !!!this.getFile()) {
|
|
134
|
+
throw new Error_1.PathProcessorSourceLostException();
|
|
135
|
+
}
|
|
136
|
+
if (this.length() === 0 && !!!this.getFile()) {
|
|
137
|
+
return "";
|
|
138
|
+
}
|
|
139
|
+
const dirs = [];
|
|
140
|
+
for (const dirItem of this._dirs) {
|
|
141
|
+
const validation = _dirNameChecker(dirItem);
|
|
142
|
+
if (validation === "invalid") {
|
|
143
|
+
throw new Error_1.PathDirectoryValidationFailException(dirItem);
|
|
144
|
+
}
|
|
145
|
+
if (validation === "valid") {
|
|
146
|
+
dirs.push(dirItem);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
const file = this.getFile();
|
|
150
|
+
if (!!file) {
|
|
151
|
+
dirs.push(file);
|
|
152
|
+
}
|
|
153
|
+
if (dirs.length === 0) {
|
|
154
|
+
return "";
|
|
155
|
+
}
|
|
156
|
+
return dirs.join("/");
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Set the target type
|
|
160
|
+
*
|
|
161
|
+
* @param type new type
|
|
162
|
+
*/
|
|
163
|
+
setType(type) {
|
|
164
|
+
this._type = type;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Get the path type of current instance
|
|
168
|
+
*
|
|
169
|
+
* @returns return the path type
|
|
170
|
+
*/
|
|
171
|
+
getType() {
|
|
172
|
+
return this._type;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Set the path file name
|
|
176
|
+
*
|
|
177
|
+
* @param file the new file name
|
|
178
|
+
* @returns return the old file name
|
|
179
|
+
*/
|
|
180
|
+
setFile(file) {
|
|
181
|
+
const oldFile = this._file;
|
|
182
|
+
this._file = file;
|
|
183
|
+
return oldFile;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Get the file name of current instance
|
|
187
|
+
*
|
|
188
|
+
* @returns return the file name
|
|
189
|
+
*/
|
|
190
|
+
getFile() {
|
|
191
|
+
return this._file;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* IComparable impl to get a string what equals to current instance
|
|
195
|
+
*
|
|
196
|
+
* @returns return the string
|
|
197
|
+
*/
|
|
198
|
+
getString() {
|
|
199
|
+
return this.toString();
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Get a hash code of current instance
|
|
203
|
+
*
|
|
204
|
+
* @returns always return 0
|
|
205
|
+
*/
|
|
206
|
+
getHashCode() {
|
|
207
|
+
return 0;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
exports.Path = Path;
|