@@ -23,7 +23,7 @@ export class FsDir extends Pipeable<FsDir> {
23
23
* @returns The absolute path of the directory as a string
24
24
*
25
25
* ```typescript
26
- * const srcDir = dir ("./src");
26
+ * const srcDir = fsDir ("./src");
27
27
* console.log(srcDir.toString()); // "/absolute/path/to/src"
28
28
* ```
29
29
*/
@@ -56,7 +56,7 @@ export class FsDir extends Pipeable<FsDir> {
56
56
* @returns The absolute path as a string
57
57
*
58
58
* ```typescript
59
- * const srcDir = dir ("./src");
59
+ * const srcDir = fsDir ("./src");
60
60
* console.log(srcDir.path); // "/absolute/path/to/src"
61
61
* ```
62
62
*/
@@ -95,13 +95,13 @@ export class FsDir extends Pipeable<FsDir> {
95
95
*
96
96
* ```typescript
97
97
* // Create from absolute path
98
- * const rootDir = dir ("/path/to/project");
98
+ * const rootDir = fsDir ("/path/to/project");
99
99
*
100
100
* // Create from relative path
101
- * const srcDir = dir ("./src");
101
+ * const srcDir = fsDir ("./src");
102
102
*
103
103
* // Create from existing directory
104
- * const existingDir = dir(dir ("/path/to/existing"));
104
+ * const existingDir = fsDir(fsDir ("/path/to/existing"));
105
105
* ```
106
106
*/
107
107
public static cwd ( this : void , arg : FsDir | AnyPath ) : FsDir ;
@@ -118,7 +118,7 @@ export class FsDir extends Pipeable<FsDir> {
118
118
* @returns A new FsDir instance representing the combined path
119
119
*
120
120
* ```typescript
121
- * const projectDir = dir ("/path/to/project");
121
+ * const projectDir = fsDir ("/path/to/project");
122
122
*
123
123
* // Navigate to subdirectories
124
124
* const srcDir = projectDir.toDir("src");
@@ -141,7 +141,7 @@ export class FsDir extends Pipeable<FsDir> {
141
141
* @returns A new FsDir instance representing the combined path
142
142
*
143
143
* ```typescript
144
- * const projectDir = dir ("/path/to/project");
144
+ * const projectDir = fsDir ("/path/to/project");
145
145
*
146
146
* // Navigate to subdirectories
147
147
* const srcDir = projectDir.to("src");
@@ -164,7 +164,7 @@ export class FsDir extends Pipeable<FsDir> {
164
164
* @throws If an absolute path is provided
165
165
*
166
166
* ```typescript
167
- * const srcDir = dir ("./src");
167
+ * const srcDir = fsDir ("./src");
168
168
*
169
169
* // Access files in the directory
170
170
* const configFile = srcDir.toFile("config.json");
@@ -193,7 +193,7 @@ Trying to access a dir file from an absolute paths:
193
193
* @throws If an absolute path is provided
194
194
*
195
195
* ```typescript
196
- * const srcDir = dir ("./src");
196
+ * const srcDir = fsDir ("./src");
197
197
*
198
198
* // Access files in the directory
199
199
* const configFile = srcDir.file("config.json");
@@ -213,7 +213,7 @@ Trying to access a dir file from an absolute paths:
213
213
* @returns The directory name without the full path
214
214
*
215
215
* ```typescript
216
- * const srcDir = dir ("/path/to/project/src");
216
+ * const srcDir = fsDir ("/path/to/project/src");
217
217
* console.log(srcDir.name()); // "src"
218
218
* ```
219
219
*/
@@ -227,7 +227,7 @@ Trying to access a dir file from an absolute paths:
227
227
* @returns A promise that resolves to true if the directory exists, false otherwise
228
228
*
229
229
* ```typescript
230
- * const configDir = dir ("./config");
230
+ * const configDir = fsDir ("./config");
231
231
*
232
232
* if (await configDir.exists()) {
233
233
* // Directory exists, safe to use
@@ -252,7 +252,7 @@ Trying to access a dir file from an absolute paths:
252
252
* @returns True if the directory exists, false otherwise
253
253
*
254
254
* ```typescript
255
- * const configDir = dir ("./config");
255
+ * const configDir = fsDir ("./config");
256
256
*
257
257
* if (configDir.existsSync()) {
258
258
* // Directory exists, safe to use
@@ -279,7 +279,7 @@ Trying to access a dir file from an absolute paths:
279
279
* @returns A promise that resolves when the directory is created
280
280
*
281
281
* ```typescript
282
- * const assetsDir = dir ("./dist/assets/images");
282
+ * const assetsDir = fsDir ("./dist/assets/images");
283
283
*
284
284
* // Creates all necessary parent directories
285
285
* await assetsDir.make();
@@ -295,7 +295,7 @@ Trying to access a dir file from an absolute paths:
295
295
* @synchronous
296
296
*
297
297
* ```typescript
298
- * const assetsDir = dir ("./dist/assets/images");
298
+ * const assetsDir = fsDir ("./dist/assets/images");
299
299
*
300
300
* // Creates all necessary parent directories immediately
301
301
* assetsDir.makeSync();
@@ -336,7 +336,7 @@ Trying to access a dir file from an absolute paths:
336
336
* @returns A promise that resolves when the directory is removed
337
337
*
338
338
* ```typescript
339
- * const tempDir = dir ("./temp");
339
+ * const tempDir = fsDir ("./temp");
340
340
*
341
341
* // Remove directory and all contents
342
342
* await tempDir.rm();
@@ -356,7 +356,7 @@ Trying to access a dir file from an absolute paths:
356
356
* @synchronous
357
357
*
358
358
* ```typescript
359
- * const tempDir = dir ("./temp");
359
+ * const tempDir = fsDir ("./temp");
360
360
*
361
361
* // Remove directory and all contents immediately
362
362
* tempDir.rmSync();
@@ -378,7 +378,7 @@ Trying to access a dir file from an absolute paths:
378
378
* @returns A promise that resolves to an FsFileArray containing the matching files
379
379
*
380
380
* ```typescript
381
- * const srcDir = dir ("./src");
381
+ * const srcDir = fsDir ("./src");
382
382
*
383
383
* // Find all TypeScript files
384
384
* const tsFiles = await srcDir.glob("**\/*.ts");
@@ -406,7 +406,7 @@ Trying to access a dir file from an absolute paths:
406
406
* @synchronous
407
407
*
408
408
* ```typescript
409
- * const srcDir = dir ("./src");
409
+ * const srcDir = fsDir ("./src");
410
410
*
411
411
* // Find all TypeScript files synchronously
412
412
* const tsFiles = srcDir.globSync("**\/*.ts");
@@ -468,7 +468,7 @@ Trying to access a dir file from an absolute paths:
468
468
* @returns A promise that resolves to an FsFileArray containing the git-tracked files
469
469
*
470
470
* ```typescript
471
- * const projectDir = dir ("./project");
471
+ * const projectDir = fsDir ("./project");
472
472
*
473
473
* // Get all git-tracked files in the directory
474
474
* const trackedFiles = await projectDir.gitLs();
@@ -503,13 +503,13 @@ Trying to access a dir file from an absolute paths:
503
503
*
504
504
* ```typescript
505
505
* // Create from absolute path
506
- * const rootDir = dir ("/path/to/project");
506
+ * const rootDir = fsDir ("/path/to/project");
507
507
*
508
508
* // Create from relative path
509
- * const srcDir = dir ("./src");
509
+ * const srcDir = fsDir ("./src");
510
510
*
511
511
* // Create from existing directory
512
- * const existingDir = dir(dir ("/path/to/existing"));
512
+ * const existingDir = fsDir(fsDir ("/path/to/existing"));
513
513
* ```
514
514
*/
515
515
export const fsDir = FsDir . cwd ;
0 commit comments