instrumentality 0.0.3 → 0.0.5

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/road.d.ts CHANGED
@@ -1,37 +1,46 @@
1
1
  import * as fs from "node:fs";
2
2
  import * as cr from "node:crypto";
3
3
  import * as bs from "./base.ts";
4
- /**
5
- * Subclass of {@link bs.InsErr} that represents an error thrown from this specific module of the library
6
- */
4
+ /** Subclass of {@link bs.InsErr} that represents an error thrown from this specific module of the library */
7
5
  export declare class RdErr extends bs.InsErr {
8
6
  name: string;
9
7
  }
8
+ export { RdErr as RoadError };
10
9
  /**
11
- * Returns the constructor function corresponding to the file mode.
10
+ * Returns the constructor function corresponding to the file mode (statmode).
12
11
  *
13
- * @param statmode The file mode to check.
14
- * @returns The constructor function corresponding to the file mode.
12
+ * @param statmode_ The file mode to check.
13
+ * @returns The constructor function corresponding to the road type (e.g., {@link File}, {@link Folder}, etc.).
15
14
  * @throws If the file mode is unknown, throws a {@link RdErr}.
16
15
  */
17
- export declare function resolveMode(statmode: number): typeof File | typeof Folder | typeof SymbolicLink | typeof BlockDevice;
16
+ export declare function resolveMode(statmode_: number): typeof File | typeof Folder | typeof BlockDevice | typeof CharacterDevice | typeof SymbolicLink | typeof Fifo | typeof Socket;
17
+ /**
18
+ * Creates the appropriate subclass of {@link Road} based on the file mode of the specified path.
19
+ *
20
+ * @param path_ The path to follow.
21
+ * @returns A new instance of {@link Road}.
22
+ * @throws If {@link fp.lstat}/{@link fs.lstatSync} fails to retrieved the status of {@link path_}.
23
+ */
24
+ export declare function factory(path_: string): Promise<BlockDevice | CharacterDevice | Fifo | File | Folder | Socket | SymbolicLink>;
25
+ /** Sync version of {@link factory}. */
26
+ export declare function factorySync(path_: string): BlockDevice | CharacterDevice | Fifo | File | Folder | Socket | SymbolicLink;
18
27
  /**
19
- * Creates a new instance of the appropriate subclass of {@link Road} based on the file mode of the specified path.
28
+ * A map that keeps track of locked roads to prevent concurrent modifications.
29
+ *
30
+ * @key The absolute path of the road that is currently locked.
31
+ * @value A promise that resolves when the lock on the road is released.
20
32
  *
21
- * @param lookFor The path to check.
22
- * @returns A new instance of the appropriate subclass of {@link Road}.
23
- * @throws If the path does not exist, throws a fs {@link Error}.
33
+ * @remarks The map is initialized lazily when the first lock is created to minimize import-time side effects.
34
+ * It's generally meant for read-only purposes. It's not advised to modify this map directly if there are built-in mechanisms that do the job for you as well.
24
35
  */
25
- export declare function factorySync(lookFor: string): BlockDevice | File | Folder | SymbolicLink;
26
- /** Async version of {@link factorySync}. */
27
- export declare function factory(lookFor: string): Promise<BlockDevice | File | Folder | SymbolicLink>;
36
+ export declare let lockedRoads: Map<string, Promise<void>> | null;
28
37
  /**
29
- * Getter for the locked roads map.
38
+ * Road is an OOP, pointer-like representation of an entry in the local file system. It wraps around the Node.js fs module and provides a more convenient access to it.
39
+ * It's meant to help the user mentally model an entry and help them reason about it, as well as provide a more convenient API and guardrails for common operations.
30
40
  *
31
- * @param roadOrPath - A {@link Road} instance or a string representing the absolute path of the road to check.
32
- * @returns The promise associated with the locked road, or `undefined` if the road is not currently locked.
41
+ * @remarks This is by no means a one-to-one mapping of the underlying file system (after initialization).
42
+ * It is more like a memory representation, similar to a pointer in low-level programming languages; other processes might mess with the underlying entry. There are methods to check for consistency, but they are not guaranteed to be foolproof.
33
43
  */
34
- export declare function lockFor(roadOrPath: Road | string): Promise<void> | undefined;
35
44
  export declare abstract class Road {
36
45
  /** The absolute path to the file or directory that this Road instance represents.
37
46
  * @remarks Intentionally made protected to prevent external modification, as changing this value could lead to inconsistencies and unexpected behavior. */
@@ -39,163 +48,190 @@ export declare abstract class Road {
39
48
  /** Indicates whether the file or directory represented by this Road instance can be modified.
40
49
  * Changing this value does not affect the actual file system permissions, but rather serves as a safeguard within the application to prevent accidental modifications. */
41
50
  mutable: boolean;
42
- /** Accessor for the absolute path to the file or directory that this Road instance represents. */
51
+ /** Copy of the absolute path. */
43
52
  get isAt(): string;
44
- /** Accessor for the name of the file or directory that this Road instance represents. */
53
+ /** Name of the road without the path (including extensions). */
45
54
  get name(): string;
46
- /** Same as {@link isAt} but for compatibility with external libraries that try to convert the object to a string. */
55
+ /** The amount of path segments in the absolute path to the file or directory represented by this Road instance, minus one (i.e., the depth of the path in the file system hierarchy). */
56
+ get depth(): number;
57
+ /** Same as {@link isAt} but for compatibility with external APIs. */
47
58
  toString(): string;
48
- /** Returns the OS file type of the file or directory.
49
- * Return value (OS type) and the type of this instance are not guaranteed to be the same, as the file system may have changed since this instance was created. */
50
- typeSync(): typeof File | typeof Folder | typeof SymbolicLink | typeof BlockDevice;
51
- /** Async version of {@link typeSync}. */
52
- type(): Promise<typeof File | typeof Folder | typeof SymbolicLink | typeof BlockDevice>;
53
59
  /**
54
- * Constructs a new Road instance representing the file or directory at the specified path.
60
+ * Creates a new instance of the Road class.
55
61
  *
56
- * @param lookFor The path to the file or directory that this Road instance will represent.
57
- * @param typeCheck Whether to check if the type of the file or directory at the specified path matches the type of this instance.
58
- * This can be skipped for performance reasons if the type is known to be correct, but it is recommended to keep it enabled for safety.
59
- * @throws If the specified path does not exist, throws a fs.{@link Error}.
60
- * @throws If the type of the file or directory at the specified path does not match the type of this instance, throws a {@link RdErr}. Useful for subclasses.
61
- */
62
- constructor(lookFor: string, typeCheck: boolean | 1 | 0);
63
- /**
64
- * Verifies that the file or directory represented by this Road instance exists, is of the same type as this instance, and (optionally) is writable.
62
+ * @param path_ Any path-like string that can be resolved to an absolute path. It will be resolved to an absolute path using {@link ph.resolve}.
63
+ * @param typeCheck_ If true, the constructor will check if the path corresponds to the expected type of road (e.g., file, folder, etc.) and throw an error if it doesn't. If false, no type checking will be performed.
65
64
  *
66
- * @param expectMode The expected access mode for this Road other than visibility by this process.
67
- * @returns Result of the verification.
65
+ * @throws If {@link typeCheck_} is true and the path does not correspond to the expected type of road, a {@link RdErr} will be thrown.
68
66
  */
69
- verify(expectMode: number, typeCheck: boolean): Promise<boolean>;
70
- /** Sync version of {@link verify}. */
71
- verifySync(expectMode: number, typeCheck: boolean): boolean;
67
+ constructor(path_: string, typeCheck_: boolean | 1 | 0);
72
68
  /**
73
- * Creates a disposable lock for the file or directory represented by this Road instance, preventing concurrent modifications.
69
+ * Aquires a lock for the path represented by this Road instance, preventing concurrent modifications from this and other Road instances pointing to the same path.
74
70
  *
75
- * @returns An object with a `dispose` method that releases the lock when called. The lock is automatically released when the object is garbage collected.
76
- * @remarks Please use this method with the `await using` statement to ensure that the lock is properly released after the operation is complete. This method is intended for internal use and shouldn't be called directly in most cases. (that's why it's protected)
77
- */
78
- protected initChange(): Promise<{
79
- [Symbol.dispose](): void;
80
- [Symbol.asyncDispose](): Promise<void>;
81
- }>;
82
- /**
83
- * Sync version of {@link initChangeSync}.
71
+ * @param cb_ A callback function that will be called when the lock is released. This is used internally to manage the lock state.
72
+ * @returns An object with a dispose method that releases the lock when called.
73
+ * @throws If the road is immutable, a {@link RdErr} will be thrown.
84
74
  *
85
- * @remarks This sync version will throw if the road is already locked by another operation.
75
+ * @remarks This method MUST be used with a `using` statement to ensure that the lock is released properly. Failing to do so may result in deadlocks or other concurrency issues.
76
+ * Non-deterministic release is unfortunately not possible due to the nature of JavaScript's garbage collection, thus the lock must be released deterministically by the user (to which the `using` statement is a convenient way to do so).
86
77
  */
87
- protected initChangeSync(): {
88
- [Symbol.dispose](): void;
89
- [Symbol.asyncDispose](): Promise<void>;
90
- };
78
+ protected lock(cb_?: () => void): Promise<AsyncDisposable & Disposable>;
91
79
  /**
92
- * Checks if the file or directory represented by this Road is both visible and of the same type as expected.
80
+ * Sync version of {@link lock}.
81
+ * @throws Also throws a {@link RdErr} if the road is currently locked by another operation as it cannot wait for the lock to be released in a synchronous context.
93
82
  */
94
- exists(): Promise<boolean>;
95
- existsSync(): boolean;
83
+ protected lockSync(cb_?: () => void): Disposable & AsyncDisposable;
84
+ /** @returns An instance of {@link Folder} representing the parent directory of the current road. */
85
+ parent(): Folder;
96
86
  /**
97
- * @returns The file system stats for the file or directory.
98
- * @see {@link fs.lstat}
87
+ * An async generator that yields the ancestors of the current road, starting from its parent and moving up the directory tree until it reaches the root.
88
+ *
89
+ * @yields Each ancestor folder as a {@link Folder} instance.
99
90
  */
100
- stats(): Promise<fs.Stats>;
91
+ ancestorsIt(): Generator<Folder, void, unknown>;
92
+ /** @returns An array of {@link Folder} instances representing the ancestors of the current road. */
93
+ ancestors(): Folder[];
101
94
  /**
102
- * @returns The file system stats for the file or directory.
103
- * @see {@link fs.lstatSync}
95
+ * Watches the current entry for changes and resolves when the entry becomes accessible (i.e., exists and can be accessed).
96
+ *
97
+ * @param abs An {@link AbortSignal} that stops the watching process when aborted.
98
+ * @param expectMode The expected access mode for the entry, defaults to {@link fsc.F_OK} (existence check).
99
+ * @param cb_ An optional callback function that will be called with any errors encountered while checking for accessibility.
100
+ * @see {@link fp.access} on how the check for accessibility is performed.
101
+ * @see {@link fs.watch} for more information on how the watching process works.
102
+ * @see {@link on} for more information on how the event listener is set up.
104
103
  */
105
- statsSync(): fs.Stats;
104
+ untilAccessible(abs: AbortSignal, expectMode?: number, cb_?: (err: unknown) => unknown): Promise<void>;
106
105
  /**
107
- * @returns The amount of path segments in the absolute path to the file or directory represented by this Road instance, minus one (i.e., the depth of the file or directory in the file system hierarchy).
108
- * @remarks As subclasses of {@link Road} require all paths to be absolute/normalized and valid, this method is guaranteed to return a non-negative integer.
106
+ * Watches the current entry for changes and resolves when the entry is changed.
107
+ *
108
+ * @param abs_ An {@link AbortSignal} that stops the watching process when aborted.
109
+ * @param cb_ An optional callback function that will be called when the entry is changed.
110
+ * @returns The return value of the callback function, or null if no callback is provided.
109
111
  */
110
- depth(): number;
111
- /** @returns The parent folder of the file or directory represented by this Road instance. */
112
- parent(): Folder;
113
- ancestorsIt(): Generator<Folder, void, unknown>;
114
- ancestors(): Folder[];
115
- untilAccessible(mode: number | undefined, abs: AbortSignal, onEachAttempt?: () => unknown): Promise<void>;
116
- onChange<T>(abs: AbortSignal, cb?: () => T): Promise<NonNullable<Awaited<T>> | null>;
117
- metaSync(suffixID?: string): NonSharedBuffer;
118
- meta(suffixID?: string): Promise<Record<string, unknown>>;
119
- setMetaSync(meta: Record<string, unknown>, suffixID?: string): void;
120
- setMeta(meta: Record<string, unknown>, suffixID?: string): Promise<void>;
121
- abstract deleteSync(): void;
112
+ onChange<T>(abs_: AbortSignal, cb_?: () => T): Promise<NonNullable<Awaited<T>> | null>;
113
+ /** @returns The result of {@link fp.lstat} for the current entry. */
114
+ lstat(): Promise<fs.Stats>;
115
+ /** @returns The result of {@link fs.lstatSync} for the current entry. */
116
+ lstatSync(): fs.Stats;
117
+ /** @returns The result of {@link fp.stat} for the current entry. */
118
+ stat(): Promise<fs.Stats>;
119
+ /** @returns The result of {@link fs.statSync} for the current entry. */
120
+ statSync(): fs.Stats;
122
121
  abstract delete(): Promise<void>;
123
- abstract moveSync(into: Folder): void;
124
- abstract move(into: Folder): Promise<void>;
125
- abstract copySync(into: Folder): this;
126
- abstract copy(into: Folder): Promise<this>;
127
- abstract renameSync(to: string): void;
128
- abstract rename(to: string): Promise<void>;
129
- abstract resurrectSync(): void;
130
- abstract resurrect(): Promise<void>;
122
+ abstract deleteSync(): void;
123
+ abstract moveSync(into_: Folder): void;
124
+ abstract move(into_: Folder): Promise<void>;
125
+ abstract copySync(into_: Folder): this;
126
+ abstract copy(into_: Folder): Promise<this>;
127
+ abstract renameSync(to_: string): void;
128
+ abstract rename(to_: string): Promise<void>;
129
+ abstract check(): Promise<boolean>;
130
+ abstract checkSync(): boolean;
131
+ /** Type narrowing for {@link File} (similar to `instanceof` without unnecessary runtime checks). */
132
+ isFile(): this is File;
133
+ /** Type narrowing for {@link Folder} (similar to `instanceof` without unnecessary runtime checks). */
134
+ isDir(): this is Folder;
135
+ /** Type narrowing for {@link Folder} (similar to `instanceof` without unnecessary runtime checks). */
136
+ isFolder(): this is Folder;
137
+ /** Type narrowing for {@link Folder} (similar to `instanceof` without unnecessary runtime checks). */
138
+ isDirectory(): this is Folder;
139
+ /** Type narrowing for {@link Folder} (similar to `instanceof` without unnecessary runtime checks). */
140
+ isDict(): this is Folder;
141
+ /** Type narrowing for {@link Folder} (similar to `instanceof` without unnecessary runtime checks). */
142
+ isDictionary(): this is Folder;
143
+ /** Type narrowing for {@link SymbolicLink} (similar to `instanceof` without unnecessary runtime checks). */
144
+ isSymlink(): this is SymbolicLink;
145
+ /** Type narrowing for {@link SymbolicLink} (similar to `instanceof` without unnecessary runtime checks). */
146
+ isSymbolicLink(): this is SymbolicLink;
147
+ /** Type narrowing for {@link UnusableRoad} (similar to `instanceof` without unnecessary runtime checks). */
148
+ isUnusable(): this is UnusableRoad;
149
+ /** Type narrowing for {@link BlockDevice} (similar to `instanceof` without unnecessary runtime checks). */
150
+ isBlockDevice(): this is BlockDevice;
151
+ /** Type narrowing for {@link CharacterDevice} (similar to `instanceof` without unnecessary runtime checks). */
152
+ isCharacterDevice(): this is CharacterDevice;
153
+ /** Type narrowing for {@link Fifo} (similar to `instanceof` without unnecessary runtime checks). */
154
+ isFifo(): this is Fifo;
155
+ /** Type narrowing for {@link Socket} (similar to `instanceof` without unnecessary runtime checks). */
156
+ isSocket(): this is Socket;
131
157
  }
158
+ export type road_t = ConstructorParameters<typeof Road>;
159
+ /** Subclass of {@link Road} that represents a file. */
132
160
  export declare class File extends Road {
161
+ static create(at_: string): Promise<File>;
162
+ static createSync(at_: string): File;
133
163
  get ext(): string;
134
164
  get noExt(): string;
135
- static createSync(at: string): File;
136
- static create(at: string): Promise<File>;
137
- readSync(): Buffer;
138
- readSync(encoding: BufferEncoding, flag?: string): string;
139
165
  read(): Promise<Buffer>;
140
- read(encoding: BufferEncoding, flag?: string): Promise<string>;
141
- itBuffSync(chunkSize?: number, flags?: string | number, mode?: fs.Mode): Generator<Buffer<ArrayBuffer>, void, unknown>;
142
- itBuff(chunkSize?: number, flags?: string | number, mode?: fs.Mode): AsyncGenerator<Buffer<ArrayBuffer>, void, unknown>;
143
- itLines(options?: Parameters<typeof fs.createReadStream>[1]): AsyncGenerator<string, void, unknown>;
144
- computeHashSync(algorithm?: string, options?: cr.HashOptions): Buffer;
145
- computeHashSync(algorithm?: string, options?: cr.HashOptions, encoding?: BufferEncoding): string;
146
- computeHash(algorithm?: string, options?: cr.HashOptions): Promise<Buffer>;
147
- computeHash(algorithm?: string, options?: cr.HashOptions, encoding?: BufferEncoding): Promise<string>;
148
- streamHash(algorithm?: string, options?: cr.HashOptions, encoding?: BufferEncoding): Promise<Buffer | string>;
149
- writeSync(data: Buffer | string, options?: fs.WriteFileOptions): void;
150
- write(data: Buffer | string, options?: fs.WriteFileOptions): Promise<void>;
151
- appendSync(data: Buffer | string, options?: fs.WriteFileOptions): void;
152
- append(data: Buffer | string, options?: fs.WriteFileOptions): Promise<void>;
153
- sameAs(other: File): Promise<boolean>;
154
- sameAsSync(other: File): boolean;
155
- deleteSync(): void;
166
+ read(encoding_: BufferEncoding, flag_?: string): Promise<string>;
167
+ readSync(): Buffer;
168
+ readSync(encoding_: BufferEncoding, flag_?: string): string;
169
+ itBuff(chunkSize_?: number, flags_?: string | number, mode_?: fs.Mode): AsyncGenerator<Buffer<ArrayBuffer>, void, unknown>;
170
+ itBuffSync(chunkSize_?: number, flags_?: string | number, mode_?: fs.Mode): Generator<Buffer<ArrayBuffer>, void, unknown>;
171
+ write(data_: Buffer | string, options_?: fs.WriteFileOptions): Promise<void>;
172
+ writeSync(data_: Buffer | string, options_?: fs.WriteFileOptions): void;
173
+ append(data_: Buffer | string, options_?: fs.WriteFileOptions): Promise<void>;
174
+ appendSync(data_: Buffer | string, options_?: fs.WriteFileOptions): void;
156
175
  delete(): Promise<void>;
157
- moveSync(into: Folder): void;
158
- move(into: Folder): Promise<void>;
159
- copySync(into: Folder): this;
160
- copy(into: Folder): Promise<this>;
161
- renameSync(to: string): void;
162
- rename(to: string): Promise<void>;
163
- resurrectSync(): void;
164
- resurrect(): Promise<void>;
176
+ deleteSync(): void;
177
+ move(into_: Folder): Promise<void>;
178
+ moveSync(into_: Folder): void;
179
+ copy(into_: Folder): Promise<this>;
180
+ copySync(into_: Folder): this;
181
+ rename(to_: string): Promise<void>;
182
+ renameSync(to_: string): void;
183
+ check(): Promise<boolean>;
184
+ checkSync(): boolean;
185
+ isFile(): this is File;
165
186
  }
166
- export declare function entry(): File;
187
+ export declare function computeHash(f_: File, algorithm_?: string, options_?: cr.HashOptions): Promise<Buffer>;
188
+ export declare function computeHash(f_: File, algorithm_?: string, options_?: cr.HashOptions, encoding_?: BufferEncoding): Promise<string>;
189
+ export declare function computeHashSync(f_: File, algorithm_?: string, options_?: cr.HashOptions): Buffer;
190
+ export declare function computeHashSync(f_: File, algorithm_?: string, options_?: cr.HashOptions, encoding_?: BufferEncoding): string;
191
+ export declare function streamHash(f_: File, algorithm_?: string, options_?: cr.HashOptions): Promise<Buffer>;
192
+ export declare function streamHash(f_: File, algorithm_?: string, options_?: cr.HashOptions, encoding_?: BufferEncoding): Promise<string>;
193
+ export declare function streamHashSync(f_: File, algorithm_?: string, options_?: cr.HashOptions): Buffer;
194
+ export declare function streamHashSync(f_: File, algorithm_?: string, options_?: cr.HashOptions, encoding_?: BufferEncoding): string;
195
+ export declare function itLines(f_: File, options_?: fs.ReadStreamOptions): AsyncGenerator<string, void, unknown>;
196
+ export declare function fileSameAs(f1_: File, f2_: File): Promise<boolean>;
197
+ export declare function fileSameAsSync(f1_: File, f2_: File): boolean;
167
198
  export declare class Folder extends Road {
168
- static create(at: string): Promise<Folder>;
169
- static createSync(at: string): Folder;
170
- join(...paths: string[]): string;
171
- itSync(): Iterable<Road>;
172
- itSync<T extends Road>(expectedType: new () => T): Iterable<T>;
199
+ static create(at_: string): Promise<Folder>;
200
+ static createSync(at_: string): Folder;
201
+ join(...paths_: string[]): string;
173
202
  it(): AsyncIterable<Road>;
174
- it<T extends Road>(expectedType: new () => T): AsyncIterable<T>;
175
- listSync(): Road[];
176
- listSync<T extends Road>(expectedType: new () => T): T[];
203
+ it<T extends Road>(expectedType_: new (..._: any[]) => T): AsyncIterable<T>;
204
+ itSync(): Iterable<Road>;
205
+ itSync<T extends Road>(expectedType_: new (..._: any[]) => T): Iterable<T>;
177
206
  list(): Promise<Road[]>;
178
- list<T extends Road>(_expectedType: new () => T): Promise<T[]>;
179
- findSync(name: string): Road | null;
180
- findSync<T extends Road>(name: string, _expectedType: new () => T): T | null;
181
- find(name: string): Promise<Road | null>;
182
- find<T extends Road>(name: string, _expectedType: new () => T): Promise<T | null>;
183
- addSync<T extends Road>(name: string, createable: {
184
- createSync: (at: string) => T;
185
- }): T;
186
- add<T extends Road>(name: string, createable: {
207
+ list<T extends Road>(expectedType_: new (..._: any[]) => T): Promise<T[]>;
208
+ listSync(): Road[];
209
+ listSync<T extends Road>(expectedType_: new (..._: any[]) => T): T[];
210
+ find(name_: string): Promise<Road | null>;
211
+ find<T extends Road>(name_: string, expectedType_: new (..._: any[]) => T): Promise<T | null>;
212
+ findSync(name_: string): Road | null;
213
+ findSync<T extends Road>(name_: string, expectedType_: new (..._: any[]) => T): T | null;
214
+ add<T extends Road>(name_: string, createable_: {
187
215
  create: (at: string) => Promise<T>;
188
216
  }): Promise<T>;
189
- deleteSync(options?: fs.RmOptions): void;
190
- delete(options?: fs.RmOptions): Promise<void>;
191
- moveSync(into: Folder): void;
192
- move(into: Folder): Promise<void>;
193
- copySync(into: Folder): this;
194
- copy(into: Folder): Promise<this>;
195
- renameSync(to: string): void;
196
- rename(to: string): Promise<void>;
197
- resurrectSync(): void;
198
- resurrect(): Promise<void>;
217
+ addSync<T extends Road>(name_: string, createable_: {
218
+ createSync: (at: string) => T;
219
+ }): T;
220
+ delete(options_?: fs.RmOptions): Promise<void>;
221
+ deleteSync(options_?: fs.RmOptions): void;
222
+ move(into_: Folder): Promise<void>;
223
+ moveSync(into_: Folder): void;
224
+ copy(into_: Folder): Promise<this>;
225
+ copySync(into_: Folder): this;
226
+ rename(to_: string): Promise<void>;
227
+ renameSync(to_: string): void;
228
+ check(): Promise<boolean>;
229
+ checkSync(): boolean;
230
+ isFolder(): this is Folder;
231
+ isDir(): this is Folder;
232
+ isDirectory(): this is Folder;
233
+ isDict(): this is Folder;
234
+ isDictionary(): this is Folder;
199
235
  }
200
236
  export declare function sysRoot(): Folder;
201
237
  export declare function home(): Folder;
@@ -203,59 +239,64 @@ export declare function tmp(): Folder;
203
239
  export declare function here(): Folder;
204
240
  export { Folder as Dir, Folder as Directory, Folder as Dict, Folder as Dictionary };
205
241
  export declare class SymbolicLink extends Road {
206
- static create(at: string, target: Road): Promise<SymbolicLink>;
207
- static createSync(_at: string, _target: Road): SymbolicLink;
208
- targetSync(): BlockDevice | File | Folder | SymbolicLink;
209
- target(): Promise<BlockDevice | File | Folder | SymbolicLink>;
210
- retargetSync(_newTarget: Road): void;
211
- retarget(_newTarget: Road): Promise<void>;
212
- deleteSync(): void;
242
+ static create(at_: string, target_: string | Road): Promise<SymbolicLink>;
243
+ static createSync(at_: string, target_: string | Road): SymbolicLink;
244
+ target(): Promise<BlockDevice | CharacterDevice | Fifo | File | Folder | Socket | SymbolicLink>;
245
+ targetSync(): BlockDevice | CharacterDevice | Fifo | File | Folder | Socket | SymbolicLink;
246
+ retarget(to_: Road): Promise<void>;
247
+ retargetSync(to_: Road): void;
213
248
  delete(): Promise<void>;
214
- moveSync(_into: Folder): void;
215
- move(_into: Folder): Promise<void>;
216
- copySync(_into: Folder): this;
217
- copy(_into: Folder): Promise<this>;
218
- renameSync(_to: string): void;
219
- rename(_to: string): Promise<void>;
220
- resurrectSync(): void;
221
- resurrect(): Promise<void>;
249
+ deleteSync(): void;
250
+ move(into_: Folder): Promise<void>;
251
+ moveSync(into_: Folder): void;
252
+ copy(into_: Folder): Promise<this>;
253
+ copySync(into_: Folder): this;
254
+ rename(to_: string): Promise<void>;
255
+ renameSync(to_: string): void;
256
+ check(): Promise<boolean>;
257
+ checkSync(): boolean;
258
+ isSymlink(): this is SymbolicLink;
259
+ isSymbolicLink(): this is SymbolicLink;
222
260
  }
223
261
  export { SymbolicLink as Symlink };
224
262
  export declare abstract class UnusableRoad extends Road {
225
263
  readonly mutable: boolean;
226
- constructor(_at: string, typeCheck: boolean);
264
+ constructor(...args_: ConstructorParameters<typeof Road>);
227
265
  error(): never;
228
- initChangeSync(): never;
229
- initChange(): Promise<never>;
230
- deleteSync(): never;
266
+ lock(): Promise<never>;
267
+ lockSync(): never;
231
268
  delete(): Promise<never>;
232
- moveSync(): never;
269
+ deleteSync(): never;
233
270
  move(): Promise<never>;
234
- copySync(): never;
271
+ moveSync(): never;
235
272
  copy(): Promise<never>;
236
- renameSync(): never;
273
+ copySync(): never;
237
274
  rename(): Promise<never>;
238
- resurrectSync(): never;
239
- resurrect(): Promise<never>;
275
+ renameSync(): never;
276
+ isUnusable(): this is UnusableRoad;
240
277
  }
241
278
  export declare class BlockDevice extends UnusableRoad {
279
+ check(): Promise<boolean>;
280
+ checkSync(): boolean;
281
+ isBlockDevice(): this is BlockDevice;
242
282
  }
243
283
  export declare class CharacterDevice extends UnusableRoad {
284
+ check(): Promise<boolean>;
285
+ checkSync(): boolean;
286
+ isCharacterDevice(): this is CharacterDevice;
244
287
  }
245
288
  export declare class Fifo extends UnusableRoad {
289
+ check(): Promise<boolean>;
290
+ checkSync(): boolean;
291
+ isFifo(): this is Fifo;
246
292
  }
247
293
  export declare class Socket extends UnusableRoad {
294
+ check(): Promise<boolean>;
295
+ checkSync(): boolean;
296
+ isSocket(): this is Socket;
248
297
  }
249
- export declare let finalizer: FinalizationRegistry<string> | null;
250
- export declare let toDelete: Set<string> | null;
251
- /**
252
- * Forcefully cleans up all files and folders registered for cleanup on exit.
253
- *
254
- * @remarks This function is not recommended to be called manually, as it will delete all files and folders registered for cleanup on exit, which may lead to data loss if called at the wrong time. This function is intended to be called automatically when the process exits.
255
- */
256
- export declare function forceCleanupToDelete(): void;
257
- export declare function registerToCleanup(self: Road): void;
258
- export declare function Temp<T extends Road>(createable: {
298
+ export declare function registerToCleanup(self_: Road): void;
299
+ export declare function Temp<T extends Road>(createable_: {
259
300
  createSync: (at: string) => T;
260
- }, autoCleanup: boolean): T & Disposable & AsyncDisposable;
301
+ }, autoCleanup_: boolean): T & Disposable & AsyncDisposable;
261
302
  //# sourceMappingURL=road.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"road.d.ts","sourceRoot":"","sources":["../src/road.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAI9B,OAAO,KAAK,EAAE,MAAM,aAAa,CAAA;AAGjC,OAAO,KAAK,EAAE,MAAM,WAAW,CAAA;AAI/B;;GAEG;AACH,qBAAa,KAAM,SAAQ,EAAE,CAAC,MAAM;IAAY,IAAI,SAA+B;CAAE;AAIrF;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,0EAW3C;AAID;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,8CAG1C;AACD,4CAA4C;AAC5C,wBAAsB,OAAO,CAAC,OAAO,EAAE,MAAM,uDAG5C;AAWD;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,UAAU,EAAE,IAAI,GAAG,MAAM,6BAEhD;AAID,8BAAsB,IAAI;IACxB;+JAC2J;IAC3J,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAA;IAC1B;8KAC0K;IAC1K,OAAO,EAAE,OAAO,CAAO;IAGvB,kGAAkG;IAClG,IAAI,IAAI,WAA2B;IACnC,yFAAyF;IACzF,IAAI,IAAI,WAAgE;IACxE,qHAAqH;IACrH,QAAQ,WAAuB;IAC/B;sKACkK;IAClK,QAAQ,2EAAyD;IACjE,yCAAyC;IACnC,IAAI,oFAA6D;IAEvE;;;;;;;;OAQG;IACH,YAAY,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,GAAG,CAAC,GAAG,CAAC,EAItD;IAED;;;;;OAKG;IACG,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAOrE;IAC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