xray16 1.5.4 → 1.6.1
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/README.md +6 -0
- package/package.json +12 -6
- package/plugins/optimize_return_ternary.d.ts +6 -0
- package/plugins/optimize_return_ternary.js +65 -0
- package/xray16.d.ts +30847 -0
- package/types/index.d.ts +0 -55
- package/types/xr_ai/xr_action.d.ts +0 -1802
- package/types/xr_ai/xr_alife.d.ts +0 -1870
- package/types/xr_ai/xr_enemy_evaluation.d.ts +0 -134
- package/types/xr_ai/xr_goap.d.ts +0 -1116
- package/types/xr_ai/xr_graph.d.ts +0 -135
- package/types/xr_ai/xr_memory.d.ts +0 -382
- package/types/xr_lib/xr_animation.d.ts +0 -252
- package/types/xr_lib/xr_bitwise.d.ts +0 -44
- package/types/xr_lib/xr_color.d.ts +0 -142
- package/types/xr_lib/xr_debug.d.ts +0 -181
- package/types/xr_lib/xr_dialog.d.ts +0 -132
- package/types/xr_lib/xr_flags.d.ts +0 -592
- package/types/xr_lib/xr_fs.d.ts +0 -615
- package/types/xr_lib/xr_game.d.ts +0 -362
- package/types/xr_lib/xr_hit.d.ts +0 -125
- package/types/xr_lib/xr_ini.d.ts +0 -473
- package/types/xr_lib/xr_level.d.ts +0 -795
- package/types/xr_lib/xr_luabind.d.ts +0 -90
- package/types/xr_lib/xr_map.d.ts +0 -192
- package/types/xr_lib/xr_math.d.ts +0 -871
- package/types/xr_lib/xr_multiplayer.d.ts +0 -1079
- package/types/xr_lib/xr_profile.d.ts +0 -272
- package/types/xr_lib/xr_properties.d.ts +0 -610
- package/types/xr_lib/xr_relation.d.ts +0 -231
- package/types/xr_lib/xr_render.d.ts +0 -167
- package/types/xr_lib/xr_save.d.ts +0 -833
- package/types/xr_lib/xr_sound.d.ts +0 -515
- package/types/xr_lib/xr_stats.ts +0 -49
- package/types/xr_lib/xr_task.d.ts +0 -388
- package/types/xr_lib/xr_time.d.ts +0 -177
- package/types/xr_lib/xr_type.d.ts +0 -75
- package/types/xr_object/client/xr_anomaly.d.ts +0 -70
- package/types/xr_object/client/xr_artefact.d.ts +0 -153
- package/types/xr_object/client/xr_client_object.d.ts +0 -207
- package/types/xr_object/client/xr_creature.d.ts +0 -243
- package/types/xr_object/client/xr_item.d.ts +0 -370
- package/types/xr_object/client/xr_level.d.ts +0 -753
- package/types/xr_object/client/xr_physic.d.ts +0 -644
- package/types/xr_object/client/xr_zone.d.ts +0 -85
- package/types/xr_object/script/xr_script_interface.d.ts +0 -819
- package/types/xr_object/script/xr_script_object.d.ts +0 -5719
- package/types/xr_object/script/xr_script_trade.d.ts +0 -51
- package/types/xr_object/server/xr_server_object.d.ts +0 -1486
- package/types/xr_ui/xr_ui_asset.d.ts +0 -364
- package/types/xr_ui/xr_ui_core.d.ts +0 -424
- package/types/xr_ui/xr_ui_event.d.ts +0 -1449
- package/types/xr_ui/xr_ui_interface.d.ts +0 -2447
- package/types/xr_ui/xr_ui_menu.d.ts +0 -385
- package/types/xrf_plugin.d.ts +0 -109
package/types/xr_lib/xr_fs.d.ts
DELETED
|
@@ -1,615 +0,0 @@
|
|
|
1
|
-
declare module "xray16" {
|
|
2
|
-
/**
|
|
3
|
-
* File list returned by the engine filesystem.
|
|
4
|
-
*
|
|
5
|
-
* @source C++ class FS_file_list
|
|
6
|
-
* @customConstructor FS_file_list
|
|
7
|
-
* @group xr_fs
|
|
8
|
-
*
|
|
9
|
-
* @remarks
|
|
10
|
-
* This wraps a native list allocated by the filesystem. Call `Free` when you are done and do not use the list after
|
|
11
|
-
* freeing it.
|
|
12
|
-
*/
|
|
13
|
-
export class FS_file_list {
|
|
14
|
-
/**
|
|
15
|
-
* Release the native file list.
|
|
16
|
-
*/
|
|
17
|
-
public Free(): void;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Get file item by index.
|
|
21
|
-
*
|
|
22
|
-
* @remarks
|
|
23
|
-
* The binding does not clamp the index. Use `Size` before indexing.
|
|
24
|
-
*
|
|
25
|
-
* @param index - Zero-based item index.
|
|
26
|
-
* @returns File item.
|
|
27
|
-
*/
|
|
28
|
-
public GetAt(index: u32): FS_item;
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Get number of items in the list.
|
|
32
|
-
*
|
|
33
|
-
* @returns Item count.
|
|
34
|
-
*/
|
|
35
|
-
public Size(): u32;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Sortable file list returned by extended filesystem queries.
|
|
40
|
-
*
|
|
41
|
-
* @source C++ class FS_file_list_ex
|
|
42
|
-
* @customConstructor FS_file_list_ex
|
|
43
|
-
* @group xr_fs
|
|
44
|
-
*
|
|
45
|
-
* @remarks
|
|
46
|
-
* Extended lists copy file entries into script-owned storage and force a rescan of the queried path when created.
|
|
47
|
-
*/
|
|
48
|
-
export class FS_file_list_ex {
|
|
49
|
-
/**
|
|
50
|
-
* Sort the list with an `FS_sort_by_*` mode.
|
|
51
|
-
*
|
|
52
|
-
* @remarks
|
|
53
|
-
* Unknown sort modes are ignored.
|
|
54
|
-
*
|
|
55
|
-
* @param mode - Sort mode.
|
|
56
|
-
*/
|
|
57
|
-
public Sort(mode: u32): void;
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Get file item by index.
|
|
61
|
-
*
|
|
62
|
-
* @remarks
|
|
63
|
-
* The binding does not clamp the index. Use `Size` before indexing.
|
|
64
|
-
*
|
|
65
|
-
* @param index - Zero-based item index.
|
|
66
|
-
* @returns File item.
|
|
67
|
-
*/
|
|
68
|
-
public GetAt(index: u32): FS_item;
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Get number of items in the list.
|
|
72
|
-
*
|
|
73
|
-
* @returns Item count.
|
|
74
|
-
*/
|
|
75
|
-
public Size(): u32;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* File item from an engine file list.
|
|
80
|
-
*
|
|
81
|
-
* @source C++ class FS_item
|
|
82
|
-
* @customConstructor FS_item
|
|
83
|
-
* @group xr_fs
|
|
84
|
-
*/
|
|
85
|
-
export class FS_item {
|
|
86
|
-
/**
|
|
87
|
-
* Get modification time as display text.
|
|
88
|
-
*
|
|
89
|
-
* @returns Modification time text.
|
|
90
|
-
*/
|
|
91
|
-
public Modif(): string;
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Get full file name.
|
|
95
|
-
*
|
|
96
|
-
* @returns Full file name.
|
|
97
|
-
*/
|
|
98
|
-
public NameFull(): string;
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Get short file name.
|
|
102
|
-
*
|
|
103
|
-
* @returns Short file name.
|
|
104
|
-
*/
|
|
105
|
-
public NameShort(): string;
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* Get numeric-only modification time text.
|
|
109
|
-
*
|
|
110
|
-
* @returns Modification time digits.
|
|
111
|
-
*/
|
|
112
|
-
public ModifDigitOnly(): string;
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Get file size.
|
|
116
|
-
*
|
|
117
|
-
* @returns File size in bytes.
|
|
118
|
-
*/
|
|
119
|
-
public Size(): u32;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* File descriptor exposed by the filesystem.
|
|
124
|
-
*
|
|
125
|
-
* @source C++ class fs_file
|
|
126
|
-
* @customConstructor fs_file
|
|
127
|
-
* @group xr_fs
|
|
128
|
-
*/
|
|
129
|
-
export class fs_file {
|
|
130
|
-
/**
|
|
131
|
-
* Modification timestamp.
|
|
132
|
-
*/
|
|
133
|
-
public modif: u32;
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* File name.
|
|
137
|
-
*/
|
|
138
|
-
public name: string;
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* Native file pointer.
|
|
142
|
-
*/
|
|
143
|
-
public ptr: u32;
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* Compressed file size.
|
|
147
|
-
*/
|
|
148
|
-
public size_compressed: u32;
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* Real file size.
|
|
152
|
-
*/
|
|
153
|
-
public size_real: u32;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* Result of an `FS.exist` query that checks virtual and/or external files.
|
|
158
|
-
*
|
|
159
|
-
* @source C++ class FileStatus
|
|
160
|
-
* @customConstructor FileStatus
|
|
161
|
-
* @group xr_fs
|
|
162
|
-
*
|
|
163
|
-
* @remarks
|
|
164
|
-
* The object can be used as a boolean in Lua. `External` means the file was found outside registered virtual archives.
|
|
165
|
-
*/
|
|
166
|
-
export class FileStatus {
|
|
167
|
-
/**
|
|
168
|
-
* Whether the file exists.
|
|
169
|
-
*/
|
|
170
|
-
public readonly Exists: boolean;
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
* Whether the match came from the external filesystem.
|
|
174
|
-
*/
|
|
175
|
-
public readonly External: boolean;
|
|
176
|
-
|
|
177
|
-
/**
|
|
178
|
-
* Engine-created file status.
|
|
179
|
-
*/
|
|
180
|
-
private constructor();
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* Registered filesystem path alias descriptor.
|
|
185
|
-
*
|
|
186
|
-
* @source C++ class FS_Path
|
|
187
|
-
* @customConstructor FS_Path
|
|
188
|
-
* @group xr_fs
|
|
189
|
-
*
|
|
190
|
-
* @remarks
|
|
191
|
-
* Returned by filesystem alias lookups. The object is owned by the engine filesystem. Missing aliases assert in
|
|
192
|
-
* the single-argument `get_path` binding instead of returning `null`.
|
|
193
|
-
*/
|
|
194
|
-
export class FS_Path {
|
|
195
|
-
/**
|
|
196
|
-
* Resolved full path.
|
|
197
|
-
*/
|
|
198
|
-
public readonly m_Path: string;
|
|
199
|
-
|
|
200
|
-
/**
|
|
201
|
-
* Root path used by this alias.
|
|
202
|
-
*/
|
|
203
|
-
public readonly m_Root: string;
|
|
204
|
-
|
|
205
|
-
/**
|
|
206
|
-
* Relative path segment added to the root.
|
|
207
|
-
*/
|
|
208
|
-
public readonly m_Add: string;
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* Default extension used by this alias.
|
|
212
|
-
*/
|
|
213
|
-
public readonly m_DefExt: string;
|
|
214
|
-
|
|
215
|
-
/**
|
|
216
|
-
* File dialog filter caption.
|
|
217
|
-
*/
|
|
218
|
-
public readonly m_FilterCaption: string;
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* Engine-created path descriptor.
|
|
222
|
-
*/
|
|
223
|
-
private constructor();
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
/**
|
|
227
|
-
* Opaque filesystem writer handle.
|
|
228
|
-
*
|
|
229
|
-
* @source C++ class IWriter
|
|
230
|
-
* @customConstructor IWriter
|
|
231
|
-
* @group xr_fs
|
|
232
|
-
*
|
|
233
|
-
* @remarks
|
|
234
|
-
* Returned by {@link FS.w_open}. The writer class is not registered with script-callable write methods in this
|
|
235
|
-
* binding, so scripts normally only pass it back to {@link FS.w_close}. Writer creation can return `null` when
|
|
236
|
-
* native writer setup fails.
|
|
237
|
-
*/
|
|
238
|
-
export class IWriter {
|
|
239
|
-
/**
|
|
240
|
-
* Engine-created writer handle.
|
|
241
|
-
*/
|
|
242
|
-
private constructor();
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
/**
|
|
246
|
-
* Engine filesystem facade.
|
|
247
|
-
*
|
|
248
|
-
* Path aliases such as `$game_config$` and `$logs$` are resolved by this object.
|
|
249
|
-
*
|
|
250
|
-
* @source C++ class FS
|
|
251
|
-
* @customConstructor FS
|
|
252
|
-
* @group xr_fs
|
|
253
|
-
*
|
|
254
|
-
* @remarks
|
|
255
|
-
* Mutating methods operate on real files or engine path aliases. Prefer `exist`, `path_exist`, and `update_path`
|
|
256
|
-
* before destructive operations.
|
|
257
|
-
*/
|
|
258
|
-
export class FS {
|
|
259
|
-
/**
|
|
260
|
-
* Clamp listed paths by extension.
|
|
261
|
-
*/
|
|
262
|
-
public static FS_ClampExt: 4;
|
|
263
|
-
|
|
264
|
-
/**
|
|
265
|
-
* List files.
|
|
266
|
-
*/
|
|
267
|
-
public static FS_ListFiles: 1;
|
|
268
|
-
|
|
269
|
-
/**
|
|
270
|
-
* List folders.
|
|
271
|
-
*/
|
|
272
|
-
public static FS_ListFolders: 2;
|
|
273
|
-
|
|
274
|
-
/**
|
|
275
|
-
* Do not recurse into subfolders.
|
|
276
|
-
*/
|
|
277
|
-
public static FS_RootOnly: 8;
|
|
278
|
-
|
|
279
|
-
/**
|
|
280
|
-
* Sort by modification time, newest first.
|
|
281
|
-
*/
|
|
282
|
-
public static FS_sort_by_modif_down: 5;
|
|
283
|
-
|
|
284
|
-
/**
|
|
285
|
-
* Sort by modification time, oldest first.
|
|
286
|
-
*/
|
|
287
|
-
public static FS_sort_by_modif_up: 4;
|
|
288
|
-
|
|
289
|
-
/**
|
|
290
|
-
* Sort by name descending.
|
|
291
|
-
*/
|
|
292
|
-
public static FS_sort_by_name_down: 1;
|
|
293
|
-
|
|
294
|
-
/**
|
|
295
|
-
* Sort by name ascending.
|
|
296
|
-
*/
|
|
297
|
-
public static FS_sort_by_name_up: 0;
|
|
298
|
-
|
|
299
|
-
/**
|
|
300
|
-
* Sort by size descending.
|
|
301
|
-
*/
|
|
302
|
-
public static FS_sort_by_size_down: 3;
|
|
303
|
-
|
|
304
|
-
/**
|
|
305
|
-
* Sort by size ascending.
|
|
306
|
-
*/
|
|
307
|
-
public static FS_sort_by_size_up: 2;
|
|
308
|
-
|
|
309
|
-
/**
|
|
310
|
-
* Search virtual registered files only.
|
|
311
|
-
*/
|
|
312
|
-
public static FSType_Virtual: 1;
|
|
313
|
-
|
|
314
|
-
/**
|
|
315
|
-
* Search external files only.
|
|
316
|
-
*/
|
|
317
|
-
public static FSType_External: 2;
|
|
318
|
-
|
|
319
|
-
/**
|
|
320
|
-
* Search virtual and external files.
|
|
321
|
-
*/
|
|
322
|
-
public static FSType_Any: 3;
|
|
323
|
-
|
|
324
|
-
/**
|
|
325
|
-
* Delete a directory below a path alias.
|
|
326
|
-
*
|
|
327
|
-
* @param path - Path alias or root path.
|
|
328
|
-
* @param filename - Directory name.
|
|
329
|
-
* @param remove_files - Whether files inside should be removed.
|
|
330
|
-
*/
|
|
331
|
-
public dir_delete(path: string, filename: string, remove_files: boolean): void;
|
|
332
|
-
|
|
333
|
-
/**
|
|
334
|
-
* Delete a directory.
|
|
335
|
-
*
|
|
336
|
-
* @param path - Directory path.
|
|
337
|
-
* @param remove_files - Whether files inside should be removed.
|
|
338
|
-
*/
|
|
339
|
-
public dir_delete(path: string, remove_files: boolean): void;
|
|
340
|
-
|
|
341
|
-
/**
|
|
342
|
-
* Open a file list below a path alias and folder.
|
|
343
|
-
*
|
|
344
|
-
* @param alias - Filesystem path alias.
|
|
345
|
-
* @param folder - Folder inside the alias.
|
|
346
|
-
* @param flags - Listing flags.
|
|
347
|
-
* @returns File list.
|
|
348
|
-
*/
|
|
349
|
-
public file_list_open(alias: string, folder: string, flags: u32): FS_file_list;
|
|
350
|
-
|
|
351
|
-
/**
|
|
352
|
-
* Open a file list for a resolved path or alias.
|
|
353
|
-
*
|
|
354
|
-
* @param path - Path or path alias.
|
|
355
|
-
* @param flags - Listing flags.
|
|
356
|
-
* @returns File list.
|
|
357
|
-
*/
|
|
358
|
-
public file_list_open(path: string, flags: u32): FS_file_list;
|
|
359
|
-
|
|
360
|
-
/**
|
|
361
|
-
* Open a sortable filtered file list.
|
|
362
|
-
*
|
|
363
|
-
* @remarks
|
|
364
|
-
* Forces the path to be rescanned before collecting matching entries.
|
|
365
|
-
*
|
|
366
|
-
* @param path - Path or path alias.
|
|
367
|
-
* @param flags - Listing flags.
|
|
368
|
-
* @param mask - File mask.
|
|
369
|
-
* @returns Sortable file list.
|
|
370
|
-
*/
|
|
371
|
-
public file_list_open_ex(path: string, flags: u32, mask: string): FS_file_list_ex;
|
|
372
|
-
|
|
373
|
-
/**
|
|
374
|
-
* Copy a file.
|
|
375
|
-
*
|
|
376
|
-
* @param source - Source file path.
|
|
377
|
-
* @param destination - Destination file path.
|
|
378
|
-
*/
|
|
379
|
-
public file_copy(source: string, destination: string): void;
|
|
380
|
-
|
|
381
|
-
/**
|
|
382
|
-
* Get file length.
|
|
383
|
-
*
|
|
384
|
-
* @param path - File path.
|
|
385
|
-
* @returns File length in bytes, or engine error value.
|
|
386
|
-
*/
|
|
387
|
-
public file_length(path: string): i32;
|
|
388
|
-
|
|
389
|
-
/**
|
|
390
|
-
* Rename or move a file.
|
|
391
|
-
*
|
|
392
|
-
* @param path - Source file path.
|
|
393
|
-
* @param destination - Destination file path.
|
|
394
|
-
* @param overwrite - Whether an existing destination may be overwritten.
|
|
395
|
-
*/
|
|
396
|
-
public file_rename(path: string, destination: string, overwrite: boolean): void;
|
|
397
|
-
|
|
398
|
-
/**
|
|
399
|
-
* Get file modification timestamp.
|
|
400
|
-
*
|
|
401
|
-
* @param path - File path.
|
|
402
|
-
* @returns Modification timestamp.
|
|
403
|
-
*/
|
|
404
|
-
public get_file_age(path: string): u32;
|
|
405
|
-
|
|
406
|
-
/**
|
|
407
|
-
* Get file modification timestamp as packed display value.
|
|
408
|
-
*
|
|
409
|
-
* @param path - File path.
|
|
410
|
-
* @returns Modification timestamp value.
|
|
411
|
-
*/
|
|
412
|
-
public get_file_age_str(path: string): u32;
|
|
413
|
-
|
|
414
|
-
/**
|
|
415
|
-
* Delete a file below a path alias.
|
|
416
|
-
*
|
|
417
|
-
* @param path - Path alias or root path.
|
|
418
|
-
* @param filename - File name.
|
|
419
|
-
*/
|
|
420
|
-
public file_delete(path: string, filename: string): void;
|
|
421
|
-
|
|
422
|
-
/**
|
|
423
|
-
* Delete a file.
|
|
424
|
-
*
|
|
425
|
-
* @param path - File path.
|
|
426
|
-
*/
|
|
427
|
-
public file_delete(path: string): void;
|
|
428
|
-
|
|
429
|
-
/**
|
|
430
|
-
* Check whether a file exists below a path alias.
|
|
431
|
-
*
|
|
432
|
-
* @remarks
|
|
433
|
-
* This overload checks virtual and/or external files and returns a status object.
|
|
434
|
-
*
|
|
435
|
-
* @param alias - Filesystem path alias.
|
|
436
|
-
* @param filename - File name.
|
|
437
|
-
* @param fs_type - Filesystem source to search.
|
|
438
|
-
* @returns File status.
|
|
439
|
-
*/
|
|
440
|
-
public exist(alias: string, filename: string, fs_type: TXR_fs_type): FileStatus | null;
|
|
441
|
-
|
|
442
|
-
/**
|
|
443
|
-
* Check whether a file exists below a path alias.
|
|
444
|
-
*
|
|
445
|
-
* @remarks
|
|
446
|
-
* This overload resolves `alias` and `filename`, then returns a registered file descriptor when found.
|
|
447
|
-
*
|
|
448
|
-
* @param alias - Filesystem path alias.
|
|
449
|
-
* @param filename - File name.
|
|
450
|
-
* @returns File descriptor pointer or `null`.
|
|
451
|
-
*/
|
|
452
|
-
public exist(alias: string, filename: string): i32 | null;
|
|
453
|
-
|
|
454
|
-
/**
|
|
455
|
-
* Check whether a file exists.
|
|
456
|
-
*
|
|
457
|
-
* @remarks
|
|
458
|
-
* This overload returns a registered file descriptor when found.
|
|
459
|
-
*
|
|
460
|
-
* @param path - File path.
|
|
461
|
-
* @returns File descriptor pointer or `null`.
|
|
462
|
-
*/
|
|
463
|
-
public exist(path: string): i32 | null;
|
|
464
|
-
|
|
465
|
-
/**
|
|
466
|
-
* Check whether a file exists.
|
|
467
|
-
*
|
|
468
|
-
* @remarks
|
|
469
|
-
* This overload checks virtual and/or external files and returns a status object.
|
|
470
|
-
*
|
|
471
|
-
* @param path - File path.
|
|
472
|
-
* @param fs_type - Filesystem source to search.
|
|
473
|
-
* @returns File status.
|
|
474
|
-
*/
|
|
475
|
-
public exist(path: string, fs_type: TXR_fs_type): FileStatus | null;
|
|
476
|
-
|
|
477
|
-
/**
|
|
478
|
-
* Add a path alias.
|
|
479
|
-
*
|
|
480
|
-
* @remarks
|
|
481
|
-
* Native code asserts if `root` is invalid or `alias` is already registered. On success it returns a path
|
|
482
|
-
* descriptor.
|
|
483
|
-
*
|
|
484
|
-
* @param alias - Alias name.
|
|
485
|
-
* @param root - Root path.
|
|
486
|
-
* @param path - Relative path.
|
|
487
|
-
* @param recursive - Whether subfolders should be scanned.
|
|
488
|
-
* @returns Native filesystem path descriptor.
|
|
489
|
-
*/
|
|
490
|
-
public append_path(alias: string, root: string, path: string, recursive: boolean): FS_Path;
|
|
491
|
-
|
|
492
|
-
/**
|
|
493
|
-
* Check whether a path alias exists.
|
|
494
|
-
*
|
|
495
|
-
* @param path - Path alias.
|
|
496
|
-
* @returns Whether the path exists.
|
|
497
|
-
*/
|
|
498
|
-
public path_exist(path: string): boolean;
|
|
499
|
-
|
|
500
|
-
/**
|
|
501
|
-
* Resolve path alias and suffix into a real path.
|
|
502
|
-
*
|
|
503
|
-
* @remarks
|
|
504
|
-
* Non-Windows builds normalize path separators before returning the string.
|
|
505
|
-
*
|
|
506
|
-
* @param alias - Filesystem path alias.
|
|
507
|
-
* @param add - Relative path to append.
|
|
508
|
-
* @returns Resolved path.
|
|
509
|
-
*/
|
|
510
|
-
public update_path(alias: string, add: string): string;
|
|
511
|
-
|
|
512
|
-
/**
|
|
513
|
-
* Rescan a path alias.
|
|
514
|
-
*
|
|
515
|
-
* @since OpenXRay 2015-07-07, 6e703b4c
|
|
516
|
-
*
|
|
517
|
-
* @remarks
|
|
518
|
-
* Marks the alias as needing a rescan. The next filesystem check refreshes cached entries.
|
|
519
|
-
*
|
|
520
|
-
* @param path - Path alias.
|
|
521
|
-
*/
|
|
522
|
-
public rescan_path(path: string): void;
|
|
523
|
-
|
|
524
|
-
/**
|
|
525
|
-
* Get native path descriptor for an alias.
|
|
526
|
-
*
|
|
527
|
-
* @remarks
|
|
528
|
-
* Native code asserts when the alias is missing. Use {@link FS.path_exist} before calling when the alias is
|
|
529
|
-
* optional.
|
|
530
|
-
*
|
|
531
|
-
* @param alias - Filesystem path alias.
|
|
532
|
-
* @returns Native filesystem path descriptor.
|
|
533
|
-
*/
|
|
534
|
-
public get_path(alias: string): FS_Path;
|
|
535
|
-
|
|
536
|
-
/**
|
|
537
|
-
* Close a binary reader.
|
|
538
|
-
*
|
|
539
|
-
* @param reader - Reader returned by `r_open`.
|
|
540
|
-
*/
|
|
541
|
-
public r_close(reader: reader): void;
|
|
542
|
-
|
|
543
|
-
/**
|
|
544
|
-
* Open a binary reader.
|
|
545
|
-
*
|
|
546
|
-
* @param path - File path.
|
|
547
|
-
* @returns Binary reader.
|
|
548
|
-
*/
|
|
549
|
-
public r_open(path: string): reader;
|
|
550
|
-
|
|
551
|
-
/**
|
|
552
|
-
* Open a binary reader below a path alias.
|
|
553
|
-
*
|
|
554
|
-
* @param alias - Filesystem path alias.
|
|
555
|
-
* @param path - Relative file path.
|
|
556
|
-
* @returns Binary reader.
|
|
557
|
-
*/
|
|
558
|
-
public r_open(alias: string, path: string): reader;
|
|
559
|
-
|
|
560
|
-
/**
|
|
561
|
-
* Close a binary writer.
|
|
562
|
-
*
|
|
563
|
-
* @param writer - Writer returned by `w_open`.
|
|
564
|
-
*/
|
|
565
|
-
public w_close(writer: IWriter | null): void;
|
|
566
|
-
|
|
567
|
-
/**
|
|
568
|
-
* Open a binary writer below a path alias.
|
|
569
|
-
*
|
|
570
|
-
* @remarks
|
|
571
|
-
* Can return `null` when native writer setup fails.
|
|
572
|
-
*
|
|
573
|
-
* @param path - Filesystem path alias.
|
|
574
|
-
* @param filename - Relative file path.
|
|
575
|
-
* @returns Binary writer, or `null`.
|
|
576
|
-
*/
|
|
577
|
-
public w_open(path: string, filename: string): IWriter | null;
|
|
578
|
-
|
|
579
|
-
/**
|
|
580
|
-
* Open a binary writer.
|
|
581
|
-
*
|
|
582
|
-
* @remarks
|
|
583
|
-
* Can return `null` when native writer setup fails.
|
|
584
|
-
*
|
|
585
|
-
* @param path - File path.
|
|
586
|
-
* @returns Binary writer, or `null`.
|
|
587
|
-
*/
|
|
588
|
-
public w_open(path: string): IWriter | null;
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
/**
|
|
592
|
-
* Filesystem enum value accepted by filesystem queries.
|
|
593
|
-
*
|
|
594
|
-
* @group xr_fs
|
|
595
|
-
*/
|
|
596
|
-
export type TXR_fs_type = typeof FS.FSType_Virtual | typeof FS.FSType_External | typeof FS.FSType_Any;
|
|
597
|
-
|
|
598
|
-
/**
|
|
599
|
-
* Get the global filesystem facade.
|
|
600
|
-
*
|
|
601
|
-
* @group xr_fs
|
|
602
|
-
*
|
|
603
|
-
* @returns Filesystem facade.
|
|
604
|
-
*/
|
|
605
|
-
export function getFS(this: void): FS;
|
|
606
|
-
|
|
607
|
-
/**
|
|
608
|
-
* Get operating system active username.
|
|
609
|
-
*
|
|
610
|
-
* @group xr_fs
|
|
611
|
-
*
|
|
612
|
-
* @returns Username string.
|
|
613
|
-
*/
|
|
614
|
-
export function user_name(this: void): string;
|
|
615
|
-
}
|