@visulima/fs 2.3.8 → 3.0.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/CHANGELOG.md +31 -0
- package/README.md +455 -438
- package/dist/index.cjs +0 -8
- package/dist/index.d.cts +10 -23
- package/dist/index.d.mts +10 -23
- package/dist/index.d.ts +10 -23
- package/dist/index.mjs +0 -4
- package/dist/packem_shared/observable-like.d-BlD8q22s.d.cts +40 -0
- package/dist/packem_shared/observable-like.d-BlD8q22s.d.mjs +40 -0
- package/dist/packem_shared/observable-like.d-BlD8q22s.d.mts +40 -0
- package/dist/packem_shared/{observable-like.d-CJo2GVD9.d.cts → types-CiwAWOQj.d.cts} +1 -40
- package/dist/packem_shared/{observable-like.d-CJo2GVD9.d.mjs → types-CiwAWOQj.d.mjs} +1 -40
- package/dist/packem_shared/{observable-like.d-CJo2GVD9.d.mts → types-CiwAWOQj.d.mts} +1 -40
- package/dist/utils.d.cts +2 -1
- package/dist/utils.d.mts +2 -1
- package/dist/utils.d.ts +2 -1
- package/dist/yaml.cjs +15 -0
- package/dist/yaml.d.cts +19 -0
- package/dist/yaml.d.mts +19 -0
- package/dist/yaml.d.ts +19 -0
- package/dist/yaml.mjs +4 -0
- package/package.json +23 -3
package/README.md
CHANGED
|
@@ -39,6 +39,22 @@ yarn add @visulima/fs
|
|
|
39
39
|
pnpm add @visulima/fs
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
+
> **Note:** If you want to parse or write YAML, you'll need to install `yaml` as well.
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
npm install yaml
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
yarn add yaml
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
pnpm add yaml
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
> After installing `yaml`, you can use the `readYaml`, `readYamlSync` and `writeYaml`, `writeYamlSync` functions from `@visulima/fs/yaml`.
|
|
57
|
+
|
|
42
58
|
## Usage
|
|
43
59
|
|
|
44
60
|
## walk
|
|
@@ -443,7 +459,7 @@ The printable section of the JSON which produces the error.
|
|
|
443
459
|
|
|
444
460
|
### AlreadyExistsError
|
|
445
461
|
|
|
446
|
-
Defined in: [packages/fs/src/error/already-exists-error.ts:4](https://github.com/visulima/visulima/blob/
|
|
462
|
+
Defined in: [packages/fs/src/error/already-exists-error.ts:4](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/already-exists-error.ts#L4)
|
|
447
463
|
|
|
448
464
|
Error thrown when file already exists.
|
|
449
465
|
|
|
@@ -459,7 +475,7 @@ Error thrown when file already exists.
|
|
|
459
475
|
new AlreadyExistsError(message): AlreadyExistsError
|
|
460
476
|
```
|
|
461
477
|
|
|
462
|
-
Defined in: [packages/fs/src/error/already-exists-error.ts:9](https://github.com/visulima/visulima/blob/
|
|
478
|
+
Defined in: [packages/fs/src/error/already-exists-error.ts:9](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/already-exists-error.ts#L9)
|
|
463
479
|
|
|
464
480
|
Creates a new instance.
|
|
465
481
|
|
|
@@ -491,7 +507,7 @@ Error.constructor
|
|
|
491
507
|
get code(): string
|
|
492
508
|
```
|
|
493
509
|
|
|
494
|
-
Defined in: [packages/fs/src/error/already-exists-error.ts:14](https://github.com/visulima/visulima/blob/
|
|
510
|
+
Defined in: [packages/fs/src/error/already-exists-error.ts:14](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/already-exists-error.ts#L14)
|
|
495
511
|
|
|
496
512
|
###### Returns
|
|
497
513
|
|
|
@@ -503,7 +519,7 @@ Defined in: [packages/fs/src/error/already-exists-error.ts:14](https://github.co
|
|
|
503
519
|
set code(_name): void
|
|
504
520
|
```
|
|
505
521
|
|
|
506
|
-
Defined in: [packages/fs/src/error/already-exists-error.ts:19](https://github.com/visulima/visulima/blob/
|
|
522
|
+
Defined in: [packages/fs/src/error/already-exists-error.ts:19](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/already-exists-error.ts#L19)
|
|
507
523
|
|
|
508
524
|
###### Parameters
|
|
509
525
|
|
|
@@ -523,7 +539,7 @@ Defined in: [packages/fs/src/error/already-exists-error.ts:19](https://github.co
|
|
|
523
539
|
get name(): string
|
|
524
540
|
```
|
|
525
541
|
|
|
526
|
-
Defined in: [packages/fs/src/error/already-exists-error.ts:24](https://github.com/visulima/visulima/blob/
|
|
542
|
+
Defined in: [packages/fs/src/error/already-exists-error.ts:24](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/already-exists-error.ts#L24)
|
|
527
543
|
|
|
528
544
|
###### Returns
|
|
529
545
|
|
|
@@ -535,7 +551,7 @@ Defined in: [packages/fs/src/error/already-exists-error.ts:24](https://github.co
|
|
|
535
551
|
set name(_name): void
|
|
536
552
|
```
|
|
537
553
|
|
|
538
|
-
Defined in: [packages/fs/src/error/already-exists-error.ts:29](https://github.com/visulima/visulima/blob/
|
|
554
|
+
Defined in: [packages/fs/src/error/already-exists-error.ts:29](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/already-exists-error.ts#L29)
|
|
539
555
|
|
|
540
556
|
###### Parameters
|
|
541
557
|
|
|
@@ -681,7 +697,7 @@ Error.stackTraceLimit
|
|
|
681
697
|
|
|
682
698
|
### DirectoryError
|
|
683
699
|
|
|
684
|
-
Defined in: [packages/fs/src/error/directory-error.ts:4](https://github.com/visulima/visulima/blob/
|
|
700
|
+
Defined in: [packages/fs/src/error/directory-error.ts:4](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/directory-error.ts#L4)
|
|
685
701
|
|
|
686
702
|
Error thrown when an operation is not allowed on a directory.
|
|
687
703
|
|
|
@@ -697,7 +713,7 @@ Error thrown when an operation is not allowed on a directory.
|
|
|
697
713
|
new DirectoryError(message): DirectoryError
|
|
698
714
|
```
|
|
699
715
|
|
|
700
|
-
Defined in: [packages/fs/src/error/directory-error.ts:9](https://github.com/visulima/visulima/blob/
|
|
716
|
+
Defined in: [packages/fs/src/error/directory-error.ts:9](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/directory-error.ts#L9)
|
|
701
717
|
|
|
702
718
|
Creates a new instance.
|
|
703
719
|
|
|
@@ -729,7 +745,7 @@ Error.constructor
|
|
|
729
745
|
get code(): string
|
|
730
746
|
```
|
|
731
747
|
|
|
732
|
-
Defined in: [packages/fs/src/error/directory-error.ts:14](https://github.com/visulima/visulima/blob/
|
|
748
|
+
Defined in: [packages/fs/src/error/directory-error.ts:14](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/directory-error.ts#L14)
|
|
733
749
|
|
|
734
750
|
###### Returns
|
|
735
751
|
|
|
@@ -741,7 +757,7 @@ Defined in: [packages/fs/src/error/directory-error.ts:14](https://github.com/vis
|
|
|
741
757
|
set code(_name): void
|
|
742
758
|
```
|
|
743
759
|
|
|
744
|
-
Defined in: [packages/fs/src/error/directory-error.ts:19](https://github.com/visulima/visulima/blob/
|
|
760
|
+
Defined in: [packages/fs/src/error/directory-error.ts:19](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/directory-error.ts#L19)
|
|
745
761
|
|
|
746
762
|
###### Parameters
|
|
747
763
|
|
|
@@ -761,7 +777,7 @@ Defined in: [packages/fs/src/error/directory-error.ts:19](https://github.com/vis
|
|
|
761
777
|
get name(): string
|
|
762
778
|
```
|
|
763
779
|
|
|
764
|
-
Defined in: [packages/fs/src/error/directory-error.ts:24](https://github.com/visulima/visulima/blob/
|
|
780
|
+
Defined in: [packages/fs/src/error/directory-error.ts:24](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/directory-error.ts#L24)
|
|
765
781
|
|
|
766
782
|
###### Returns
|
|
767
783
|
|
|
@@ -773,7 +789,7 @@ Defined in: [packages/fs/src/error/directory-error.ts:24](https://github.com/vis
|
|
|
773
789
|
set name(_name): void
|
|
774
790
|
```
|
|
775
791
|
|
|
776
|
-
Defined in: [packages/fs/src/error/directory-error.ts:29](https://github.com/visulima/visulima/blob/
|
|
792
|
+
Defined in: [packages/fs/src/error/directory-error.ts:29](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/directory-error.ts#L29)
|
|
777
793
|
|
|
778
794
|
###### Parameters
|
|
779
795
|
|
|
@@ -919,7 +935,7 @@ Error.stackTraceLimit
|
|
|
919
935
|
|
|
920
936
|
### NotEmptyError
|
|
921
937
|
|
|
922
|
-
Defined in: [packages/fs/src/error/not-empty-error.ts:4](https://github.com/visulima/visulima/blob/
|
|
938
|
+
Defined in: [packages/fs/src/error/not-empty-error.ts:4](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/not-empty-error.ts#L4)
|
|
923
939
|
|
|
924
940
|
Error thrown when a directory is not empty.
|
|
925
941
|
|
|
@@ -935,7 +951,7 @@ Error thrown when a directory is not empty.
|
|
|
935
951
|
new NotEmptyError(message): NotEmptyError
|
|
936
952
|
```
|
|
937
953
|
|
|
938
|
-
Defined in: [packages/fs/src/error/not-empty-error.ts:9](https://github.com/visulima/visulima/blob/
|
|
954
|
+
Defined in: [packages/fs/src/error/not-empty-error.ts:9](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/not-empty-error.ts#L9)
|
|
939
955
|
|
|
940
956
|
Creates a new instance.
|
|
941
957
|
|
|
@@ -967,7 +983,7 @@ Error.constructor
|
|
|
967
983
|
get code(): string
|
|
968
984
|
```
|
|
969
985
|
|
|
970
|
-
Defined in: [packages/fs/src/error/not-empty-error.ts:14](https://github.com/visulima/visulima/blob/
|
|
986
|
+
Defined in: [packages/fs/src/error/not-empty-error.ts:14](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/not-empty-error.ts#L14)
|
|
971
987
|
|
|
972
988
|
###### Returns
|
|
973
989
|
|
|
@@ -979,7 +995,7 @@ Defined in: [packages/fs/src/error/not-empty-error.ts:14](https://github.com/vis
|
|
|
979
995
|
set code(_name): void
|
|
980
996
|
```
|
|
981
997
|
|
|
982
|
-
Defined in: [packages/fs/src/error/not-empty-error.ts:19](https://github.com/visulima/visulima/blob/
|
|
998
|
+
Defined in: [packages/fs/src/error/not-empty-error.ts:19](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/not-empty-error.ts#L19)
|
|
983
999
|
|
|
984
1000
|
###### Parameters
|
|
985
1001
|
|
|
@@ -999,7 +1015,7 @@ Defined in: [packages/fs/src/error/not-empty-error.ts:19](https://github.com/vis
|
|
|
999
1015
|
get name(): string
|
|
1000
1016
|
```
|
|
1001
1017
|
|
|
1002
|
-
Defined in: [packages/fs/src/error/not-empty-error.ts:24](https://github.com/visulima/visulima/blob/
|
|
1018
|
+
Defined in: [packages/fs/src/error/not-empty-error.ts:24](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/not-empty-error.ts#L24)
|
|
1003
1019
|
|
|
1004
1020
|
###### Returns
|
|
1005
1021
|
|
|
@@ -1011,7 +1027,7 @@ Defined in: [packages/fs/src/error/not-empty-error.ts:24](https://github.com/vis
|
|
|
1011
1027
|
set name(_name): void
|
|
1012
1028
|
```
|
|
1013
1029
|
|
|
1014
|
-
Defined in: [packages/fs/src/error/not-empty-error.ts:29](https://github.com/visulima/visulima/blob/
|
|
1030
|
+
Defined in: [packages/fs/src/error/not-empty-error.ts:29](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/not-empty-error.ts#L29)
|
|
1015
1031
|
|
|
1016
1032
|
###### Parameters
|
|
1017
1033
|
|
|
@@ -1157,7 +1173,7 @@ Error.stackTraceLimit
|
|
|
1157
1173
|
|
|
1158
1174
|
### NotFoundError
|
|
1159
1175
|
|
|
1160
|
-
Defined in: [packages/fs/src/error/not-found-error.ts:4](https://github.com/visulima/visulima/blob/
|
|
1176
|
+
Defined in: [packages/fs/src/error/not-found-error.ts:4](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/not-found-error.ts#L4)
|
|
1161
1177
|
|
|
1162
1178
|
Error thrown when a file or directory is not found.
|
|
1163
1179
|
|
|
@@ -1173,7 +1189,7 @@ Error thrown when a file or directory is not found.
|
|
|
1173
1189
|
new NotFoundError(message): NotFoundError
|
|
1174
1190
|
```
|
|
1175
1191
|
|
|
1176
|
-
Defined in: [packages/fs/src/error/not-found-error.ts:9](https://github.com/visulima/visulima/blob/
|
|
1192
|
+
Defined in: [packages/fs/src/error/not-found-error.ts:9](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/not-found-error.ts#L9)
|
|
1177
1193
|
|
|
1178
1194
|
Creates a new instance.
|
|
1179
1195
|
|
|
@@ -1205,7 +1221,7 @@ Error.constructor
|
|
|
1205
1221
|
get code(): string
|
|
1206
1222
|
```
|
|
1207
1223
|
|
|
1208
|
-
Defined in: [packages/fs/src/error/not-found-error.ts:14](https://github.com/visulima/visulima/blob/
|
|
1224
|
+
Defined in: [packages/fs/src/error/not-found-error.ts:14](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/not-found-error.ts#L14)
|
|
1209
1225
|
|
|
1210
1226
|
###### Returns
|
|
1211
1227
|
|
|
@@ -1217,7 +1233,7 @@ Defined in: [packages/fs/src/error/not-found-error.ts:14](https://github.com/vis
|
|
|
1217
1233
|
set code(_name): void
|
|
1218
1234
|
```
|
|
1219
1235
|
|
|
1220
|
-
Defined in: [packages/fs/src/error/not-found-error.ts:19](https://github.com/visulima/visulima/blob/
|
|
1236
|
+
Defined in: [packages/fs/src/error/not-found-error.ts:19](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/not-found-error.ts#L19)
|
|
1221
1237
|
|
|
1222
1238
|
###### Parameters
|
|
1223
1239
|
|
|
@@ -1237,7 +1253,7 @@ Defined in: [packages/fs/src/error/not-found-error.ts:19](https://github.com/vis
|
|
|
1237
1253
|
get name(): string
|
|
1238
1254
|
```
|
|
1239
1255
|
|
|
1240
|
-
Defined in: [packages/fs/src/error/not-found-error.ts:24](https://github.com/visulima/visulima/blob/
|
|
1256
|
+
Defined in: [packages/fs/src/error/not-found-error.ts:24](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/not-found-error.ts#L24)
|
|
1241
1257
|
|
|
1242
1258
|
###### Returns
|
|
1243
1259
|
|
|
@@ -1249,7 +1265,7 @@ Defined in: [packages/fs/src/error/not-found-error.ts:24](https://github.com/vis
|
|
|
1249
1265
|
set name(_name): void
|
|
1250
1266
|
```
|
|
1251
1267
|
|
|
1252
|
-
Defined in: [packages/fs/src/error/not-found-error.ts:29](https://github.com/visulima/visulima/blob/
|
|
1268
|
+
Defined in: [packages/fs/src/error/not-found-error.ts:29](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/not-found-error.ts#L29)
|
|
1253
1269
|
|
|
1254
1270
|
###### Parameters
|
|
1255
1271
|
|
|
@@ -1395,7 +1411,7 @@ Error.stackTraceLimit
|
|
|
1395
1411
|
|
|
1396
1412
|
### PermissionError
|
|
1397
1413
|
|
|
1398
|
-
Defined in: [packages/fs/src/error/permission-error.ts:4](https://github.com/visulima/visulima/blob/
|
|
1414
|
+
Defined in: [packages/fs/src/error/permission-error.ts:4](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/permission-error.ts#L4)
|
|
1399
1415
|
|
|
1400
1416
|
Error thrown when an operation is not permitted.
|
|
1401
1417
|
|
|
@@ -1411,7 +1427,7 @@ Error thrown when an operation is not permitted.
|
|
|
1411
1427
|
new PermissionError(message): PermissionError
|
|
1412
1428
|
```
|
|
1413
1429
|
|
|
1414
|
-
Defined in: [packages/fs/src/error/permission-error.ts:9](https://github.com/visulima/visulima/blob/
|
|
1430
|
+
Defined in: [packages/fs/src/error/permission-error.ts:9](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/permission-error.ts#L9)
|
|
1415
1431
|
|
|
1416
1432
|
Creates a new instance.
|
|
1417
1433
|
|
|
@@ -1443,7 +1459,7 @@ Error.constructor
|
|
|
1443
1459
|
get code(): string
|
|
1444
1460
|
```
|
|
1445
1461
|
|
|
1446
|
-
Defined in: [packages/fs/src/error/permission-error.ts:14](https://github.com/visulima/visulima/blob/
|
|
1462
|
+
Defined in: [packages/fs/src/error/permission-error.ts:14](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/permission-error.ts#L14)
|
|
1447
1463
|
|
|
1448
1464
|
###### Returns
|
|
1449
1465
|
|
|
@@ -1455,7 +1471,7 @@ Defined in: [packages/fs/src/error/permission-error.ts:14](https://github.com/vi
|
|
|
1455
1471
|
set code(_name): void
|
|
1456
1472
|
```
|
|
1457
1473
|
|
|
1458
|
-
Defined in: [packages/fs/src/error/permission-error.ts:19](https://github.com/visulima/visulima/blob/
|
|
1474
|
+
Defined in: [packages/fs/src/error/permission-error.ts:19](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/permission-error.ts#L19)
|
|
1459
1475
|
|
|
1460
1476
|
###### Parameters
|
|
1461
1477
|
|
|
@@ -1475,7 +1491,7 @@ Defined in: [packages/fs/src/error/permission-error.ts:19](https://github.com/vi
|
|
|
1475
1491
|
get name(): string
|
|
1476
1492
|
```
|
|
1477
1493
|
|
|
1478
|
-
Defined in: [packages/fs/src/error/permission-error.ts:24](https://github.com/visulima/visulima/blob/
|
|
1494
|
+
Defined in: [packages/fs/src/error/permission-error.ts:24](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/permission-error.ts#L24)
|
|
1479
1495
|
|
|
1480
1496
|
###### Returns
|
|
1481
1497
|
|
|
@@ -1487,7 +1503,7 @@ Defined in: [packages/fs/src/error/permission-error.ts:24](https://github.com/vi
|
|
|
1487
1503
|
set name(_name): void
|
|
1488
1504
|
```
|
|
1489
1505
|
|
|
1490
|
-
Defined in: [packages/fs/src/error/permission-error.ts:29](https://github.com/visulima/visulima/blob/
|
|
1506
|
+
Defined in: [packages/fs/src/error/permission-error.ts:29](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/permission-error.ts#L29)
|
|
1491
1507
|
|
|
1492
1508
|
###### Parameters
|
|
1493
1509
|
|
|
@@ -1633,7 +1649,7 @@ Error.stackTraceLimit
|
|
|
1633
1649
|
|
|
1634
1650
|
### WalkError
|
|
1635
1651
|
|
|
1636
|
-
Defined in: [packages/fs/src/error/walk-error.ts:7](https://github.com/visulima/visulima/blob/
|
|
1652
|
+
Defined in: [packages/fs/src/error/walk-error.ts:7](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/walk-error.ts#L7)
|
|
1637
1653
|
|
|
1638
1654
|
Error thrown in walk or walkSync during iteration.
|
|
1639
1655
|
|
|
@@ -1649,7 +1665,7 @@ Error thrown in walk or walkSync during iteration.
|
|
|
1649
1665
|
new WalkError(cause, root): WalkError
|
|
1650
1666
|
```
|
|
1651
1667
|
|
|
1652
|
-
Defined in: [packages/fs/src/error/walk-error.ts:12](https://github.com/visulima/visulima/blob/
|
|
1668
|
+
Defined in: [packages/fs/src/error/walk-error.ts:12](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/walk-error.ts#L12)
|
|
1653
1669
|
|
|
1654
1670
|
Constructs a new instance.
|
|
1655
1671
|
|
|
@@ -1683,7 +1699,7 @@ Error.constructor
|
|
|
1683
1699
|
get name(): string
|
|
1684
1700
|
```
|
|
1685
1701
|
|
|
1686
|
-
Defined in: [packages/fs/src/error/walk-error.ts:21](https://github.com/visulima/visulima/blob/
|
|
1702
|
+
Defined in: [packages/fs/src/error/walk-error.ts:21](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/walk-error.ts#L21)
|
|
1687
1703
|
|
|
1688
1704
|
###### Returns
|
|
1689
1705
|
|
|
@@ -1695,7 +1711,7 @@ Defined in: [packages/fs/src/error/walk-error.ts:21](https://github.com/visulima
|
|
|
1695
1711
|
set name(_name): void
|
|
1696
1712
|
```
|
|
1697
1713
|
|
|
1698
|
-
Defined in: [packages/fs/src/error/walk-error.ts:26](https://github.com/visulima/visulima/blob/
|
|
1714
|
+
Defined in: [packages/fs/src/error/walk-error.ts:26](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/walk-error.ts#L26)
|
|
1699
1715
|
|
|
1700
1716
|
###### Parameters
|
|
1701
1717
|
|
|
@@ -1781,7 +1797,7 @@ Error.message
|
|
|
1781
1797
|
root: string;
|
|
1782
1798
|
```
|
|
1783
1799
|
|
|
1784
|
-
Defined in: [packages/fs/src/error/walk-error.ts:9](https://github.com/visulima/visulima/blob/
|
|
1800
|
+
Defined in: [packages/fs/src/error/walk-error.ts:9](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/walk-error.ts#L9)
|
|
1785
1801
|
|
|
1786
1802
|
File path of the root that's being walked.
|
|
1787
1803
|
|
|
@@ -1862,7 +1878,7 @@ Re-exports [JSONError](utils.md#jsonerror)
|
|
|
1862
1878
|
function collect(directory, options): Promise<string[]>
|
|
1863
1879
|
```
|
|
1864
1880
|
|
|
1865
|
-
Defined in: [packages/fs/src/find/collect.ts:4](https://github.com/visulima/visulima/blob/
|
|
1881
|
+
Defined in: [packages/fs/src/find/collect.ts:4](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/find/collect.ts#L4)
|
|
1866
1882
|
|
|
1867
1883
|
#### Parameters
|
|
1868
1884
|
|
|
@@ -1886,7 +1902,7 @@ Defined in: [packages/fs/src/find/collect.ts:4](https://github.com/visulima/visu
|
|
|
1886
1902
|
function collectSync(directory, options): string[]
|
|
1887
1903
|
```
|
|
1888
1904
|
|
|
1889
|
-
Defined in: [packages/fs/src/find/collect-sync.ts:4](https://github.com/visulima/visulima/blob/
|
|
1905
|
+
Defined in: [packages/fs/src/find/collect-sync.ts:4](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/find/collect-sync.ts#L4)
|
|
1890
1906
|
|
|
1891
1907
|
#### Parameters
|
|
1892
1908
|
|
|
@@ -1910,7 +1926,7 @@ Defined in: [packages/fs/src/find/collect-sync.ts:4](https://github.com/visulima
|
|
|
1910
1926
|
function detect(content): "\n" | "\r\n"
|
|
1911
1927
|
```
|
|
1912
1928
|
|
|
1913
|
-
Defined in: [packages/fs/src/eol.ts:20](https://github.com/visulima/visulima/blob/
|
|
1929
|
+
Defined in: [packages/fs/src/eol.ts:20](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/eol.ts#L20)
|
|
1914
1930
|
|
|
1915
1931
|
Detect the EOL character for string input.
|
|
1916
1932
|
Returns null if no newline.
|
|
@@ -1933,7 +1949,7 @@ Returns null if no newline.
|
|
|
1933
1949
|
function emptyDir(dir, options?): Promise<void>
|
|
1934
1950
|
```
|
|
1935
1951
|
|
|
1936
|
-
Defined in: [packages/fs/src/remove/empty-dir.ts:19](https://github.com/visulima/visulima/blob/
|
|
1952
|
+
Defined in: [packages/fs/src/remove/empty-dir.ts:19](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/remove/empty-dir.ts#L19)
|
|
1937
1953
|
|
|
1938
1954
|
Ensures that a directory is empty.
|
|
1939
1955
|
Deletes directory contents if the directory is not empty.
|
|
@@ -1962,7 +1978,7 @@ The directory itself is not deleted.
|
|
|
1962
1978
|
function emptyDirSync(dir, options?): void
|
|
1963
1979
|
```
|
|
1964
1980
|
|
|
1965
|
-
Defined in: [packages/fs/src/remove/empty-dir-sync.ts:18](https://github.com/visulima/visulima/blob/
|
|
1981
|
+
Defined in: [packages/fs/src/remove/empty-dir-sync.ts:18](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/remove/empty-dir-sync.ts#L18)
|
|
1966
1982
|
|
|
1967
1983
|
Ensures that a directory is empty.
|
|
1968
1984
|
Deletes directory contents if the directory is not empty.
|
|
@@ -1991,7 +2007,7 @@ The directory itself is not deleted.
|
|
|
1991
2007
|
function ensureDir(directory): Promise<void>
|
|
1992
2008
|
```
|
|
1993
2009
|
|
|
1994
|
-
Defined in: [packages/fs/src/ensure/ensure-dir.ts:12](https://github.com/visulima/visulima/blob/
|
|
2010
|
+
Defined in: [packages/fs/src/ensure/ensure-dir.ts:12](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/ensure/ensure-dir.ts#L12)
|
|
1995
2011
|
|
|
1996
2012
|
Ensures that the directory exists.
|
|
1997
2013
|
If the directory structure does not exist, it is created. Like mkdir -p.
|
|
@@ -2014,7 +2030,7 @@ If the directory structure does not exist, it is created. Like mkdir -p.
|
|
|
2014
2030
|
function ensureDirSync(directory): void
|
|
2015
2031
|
```
|
|
2016
2032
|
|
|
2017
|
-
Defined in: [packages/fs/src/ensure/ensure-dir-sync.ts:12](https://github.com/visulima/visulima/blob/
|
|
2033
|
+
Defined in: [packages/fs/src/ensure/ensure-dir-sync.ts:12](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/ensure/ensure-dir-sync.ts#L12)
|
|
2018
2034
|
|
|
2019
2035
|
Ensures that the directory exists.
|
|
2020
2036
|
If the directory structure does not exist, it is created. Like mkdir -p.
|
|
@@ -2037,7 +2053,7 @@ If the directory structure does not exist, it is created. Like mkdir -p.
|
|
|
2037
2053
|
function ensureFile(filePath): Promise<void>
|
|
2038
2054
|
```
|
|
2039
2055
|
|
|
2040
|
-
Defined in: [packages/fs/src/ensure/ensure-file.ts:16](https://github.com/visulima/visulima/blob/
|
|
2056
|
+
Defined in: [packages/fs/src/ensure/ensure-file.ts:16](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/ensure/ensure-file.ts#L16)
|
|
2041
2057
|
|
|
2042
2058
|
Ensures that the file exists.
|
|
2043
2059
|
If the file that is requested to be created is in directories that do not exist,
|
|
@@ -2061,7 +2077,7 @@ these directories are created. If the file already exists, it is NOTMODIFIED.
|
|
|
2061
2077
|
function ensureFileSync(filePath): void
|
|
2062
2078
|
```
|
|
2063
2079
|
|
|
2064
|
-
Defined in: [packages/fs/src/ensure/ensure-file-sync.ts:16](https://github.com/visulima/visulima/blob/
|
|
2080
|
+
Defined in: [packages/fs/src/ensure/ensure-file-sync.ts:16](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/ensure/ensure-file-sync.ts#L16)
|
|
2065
2081
|
|
|
2066
2082
|
Ensures that the file exists.
|
|
2067
2083
|
If the file that is requested to be created is in directories that do not exist,
|
|
@@ -2085,7 +2101,7 @@ these directories are created. If the file already exists, it is NOTMODIFIED.
|
|
|
2085
2101
|
function ensureLink(source, destination): Promise<void>
|
|
2086
2102
|
```
|
|
2087
2103
|
|
|
2088
|
-
Defined in: [packages/fs/src/ensure/ensure-link.ts:15](https://github.com/visulima/visulima/blob/
|
|
2104
|
+
Defined in: [packages/fs/src/ensure/ensure-link.ts:15](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/ensure/ensure-link.ts#L15)
|
|
2089
2105
|
|
|
2090
2106
|
Ensures that the hard link exists.
|
|
2091
2107
|
If the directory structure does not exist, it is created.
|
|
@@ -2112,7 +2128,7 @@ If the directory structure does not exist, it is created.
|
|
|
2112
2128
|
function ensureLinkSync(source, destination): void
|
|
2113
2129
|
```
|
|
2114
2130
|
|
|
2115
|
-
Defined in: [packages/fs/src/ensure/ensure-link-sync.ts:15](https://github.com/visulima/visulima/blob/
|
|
2131
|
+
Defined in: [packages/fs/src/ensure/ensure-link-sync.ts:15](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/ensure/ensure-link-sync.ts#L15)
|
|
2116
2132
|
|
|
2117
2133
|
Ensures that the hard link exists.
|
|
2118
2134
|
If the directory structure does not exist, it is created.
|
|
@@ -2142,7 +2158,7 @@ function ensureSymlink(
|
|
|
2142
2158
|
type?): Promise<void>
|
|
2143
2159
|
```
|
|
2144
2160
|
|
|
2145
|
-
Defined in: [packages/fs/src/ensure/ensure-symlink.ts:28](https://github.com/visulima/visulima/blob/
|
|
2161
|
+
Defined in: [packages/fs/src/ensure/ensure-symlink.ts:28](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/ensure/ensure-symlink.ts#L28)
|
|
2146
2162
|
|
|
2147
2163
|
Ensures that the link exists, and points to a valid file.
|
|
2148
2164
|
If the directory structure does not exist, it is created.
|
|
@@ -2185,7 +2201,7 @@ function ensureSymlinkSync(
|
|
|
2185
2201
|
type?): void
|
|
2186
2202
|
```
|
|
2187
2203
|
|
|
2188
|
-
Defined in: [packages/fs/src/ensure/ensure-symlink-sync.ts:28](https://github.com/visulima/visulima/blob/
|
|
2204
|
+
Defined in: [packages/fs/src/ensure/ensure-symlink-sync.ts:28](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/ensure/ensure-symlink-sync.ts#L28)
|
|
2189
2205
|
|
|
2190
2206
|
Ensures that the link exists, and points to a valid file.
|
|
2191
2207
|
If the directory structure does not exist, it is created.
|
|
@@ -2225,7 +2241,7 @@ A void.
|
|
|
2225
2241
|
function findUp(name, options): Promise<string>
|
|
2226
2242
|
```
|
|
2227
2243
|
|
|
2228
|
-
Defined in: [packages/fs/src/find/find-up.ts:11](https://github.com/visulima/visulima/blob/
|
|
2244
|
+
Defined in: [packages/fs/src/find/find-up.ts:11](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/find/find-up.ts#L11)
|
|
2229
2245
|
|
|
2230
2246
|
#### Parameters
|
|
2231
2247
|
|
|
@@ -2249,7 +2265,7 @@ Defined in: [packages/fs/src/find/find-up.ts:11](https://github.com/visulima/vis
|
|
|
2249
2265
|
function findUpSync(name, options): string
|
|
2250
2266
|
```
|
|
2251
2267
|
|
|
2252
|
-
Defined in: [packages/fs/src/find/find-up-sync.ts:11](https://github.com/visulima/visulima/blob/
|
|
2268
|
+
Defined in: [packages/fs/src/find/find-up-sync.ts:11](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/find/find-up-sync.ts#L11)
|
|
2253
2269
|
|
|
2254
2270
|
#### Parameters
|
|
2255
2271
|
|
|
@@ -2273,7 +2289,7 @@ Defined in: [packages/fs/src/find/find-up-sync.ts:11](https://github.com/visulim
|
|
|
2273
2289
|
function format(content, eol): string
|
|
2274
2290
|
```
|
|
2275
2291
|
|
|
2276
|
-
Defined in: [packages/fs/src/eol.ts:36](https://github.com/visulima/visulima/blob/
|
|
2292
|
+
Defined in: [packages/fs/src/eol.ts:36](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/eol.ts#L36)
|
|
2277
2293
|
|
|
2278
2294
|
Format the file to the targeted EOL.
|
|
2279
2295
|
|
|
@@ -2299,7 +2315,7 @@ Format the file to the targeted EOL.
|
|
|
2299
2315
|
function isAccessible(path, mode?): Promise<boolean>
|
|
2300
2316
|
```
|
|
2301
2317
|
|
|
2302
|
-
Defined in: [packages/fs/src/is-accessible.ts:9](https://github.com/visulima/visulima/blob/
|
|
2318
|
+
Defined in: [packages/fs/src/is-accessible.ts:9](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/is-accessible.ts#L9)
|
|
2303
2319
|
|
|
2304
2320
|
Returns a Promise that resolves to a boolean indicating if the path is accessible or not.
|
|
2305
2321
|
|
|
@@ -2325,7 +2341,7 @@ Returns a Promise that resolves to a boolean indicating if the path is accessibl
|
|
|
2325
2341
|
function isAccessibleSync(path, mode?): boolean
|
|
2326
2342
|
```
|
|
2327
2343
|
|
|
2328
|
-
Defined in: [packages/fs/src/is-accessible-sync.ts:9](https://github.com/visulima/visulima/blob/
|
|
2344
|
+
Defined in: [packages/fs/src/is-accessible-sync.ts:9](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/is-accessible-sync.ts#L9)
|
|
2329
2345
|
|
|
2330
2346
|
Returns a boolean indicating if the path is accessible or not.
|
|
2331
2347
|
|
|
@@ -2354,7 +2370,7 @@ function move(
|
|
|
2354
2370
|
options): Promise<void>
|
|
2355
2371
|
```
|
|
2356
2372
|
|
|
2357
|
-
Defined in: [packages/fs/src/move/index.ts:35](https://github.com/visulima/visulima/blob/
|
|
2373
|
+
Defined in: [packages/fs/src/move/index.ts:35](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/move/index.ts#L35)
|
|
2358
2374
|
|
|
2359
2375
|
Move a file asynchronously.
|
|
2360
2376
|
|
|
@@ -2404,7 +2420,7 @@ function moveSync(
|
|
|
2404
2420
|
options?): void
|
|
2405
2421
|
```
|
|
2406
2422
|
|
|
2407
|
-
Defined in: [packages/fs/src/move/index.ts:61](https://github.com/visulima/visulima/blob/
|
|
2423
|
+
Defined in: [packages/fs/src/move/index.ts:61](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/move/index.ts#L61)
|
|
2408
2424
|
|
|
2409
2425
|
Move a file synchronously.
|
|
2410
2426
|
|
|
@@ -2451,7 +2467,7 @@ console.log('The file has been moved');
|
|
|
2451
2467
|
function readFile<O>(path, options?): Promise<ContentType<O>>
|
|
2452
2468
|
```
|
|
2453
2469
|
|
|
2454
|
-
Defined in: [packages/fs/src/read/read-file.ts:20](https://github.com/visulima/visulima/blob/
|
|
2470
|
+
Defined in: [packages/fs/src/read/read-file.ts:20](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/read/read-file.ts#L20)
|
|
2455
2471
|
|
|
2456
2472
|
#### Type Parameters
|
|
2457
2473
|
|
|
@@ -2479,7 +2495,7 @@ Defined in: [packages/fs/src/read/read-file.ts:20](https://github.com/visulima/v
|
|
|
2479
2495
|
function readFileSync<O>(path, options?): ContentType<O>
|
|
2480
2496
|
```
|
|
2481
2497
|
|
|
2482
|
-
Defined in: [packages/fs/src/read/read-file-sync.ts:18](https://github.com/visulima/visulima/blob/
|
|
2498
|
+
Defined in: [packages/fs/src/read/read-file-sync.ts:18](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/read/read-file-sync.ts#L18)
|
|
2483
2499
|
|
|
2484
2500
|
#### Type Parameters
|
|
2485
2501
|
|
|
@@ -2509,7 +2525,7 @@ Defined in: [packages/fs/src/read/read-file-sync.ts:18](https://github.com/visul
|
|
|
2509
2525
|
function readJson<T>(path, options?): Promise<T>
|
|
2510
2526
|
```
|
|
2511
2527
|
|
|
2512
|
-
Defined in: [packages/fs/src/read/read-json.ts:8](https://github.com/visulima/visulima/blob/
|
|
2528
|
+
Defined in: [packages/fs/src/read/read-json.ts:8](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/read/read-json.ts#L8)
|
|
2513
2529
|
|
|
2514
2530
|
##### Type Parameters
|
|
2515
2531
|
|
|
@@ -2538,7 +2554,7 @@ function readJson<T>(
|
|
|
2538
2554
|
options?): Promise<T>
|
|
2539
2555
|
```
|
|
2540
2556
|
|
|
2541
|
-
Defined in: [packages/fs/src/read/read-json.ts:10](https://github.com/visulima/visulima/blob/
|
|
2557
|
+
Defined in: [packages/fs/src/read/read-json.ts:10](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/read/read-json.ts#L10)
|
|
2542
2558
|
|
|
2543
2559
|
##### Type Parameters
|
|
2544
2560
|
|
|
@@ -2572,7 +2588,7 @@ Defined in: [packages/fs/src/read/read-json.ts:10](https://github.com/visulima/v
|
|
|
2572
2588
|
function readJsonSync<T>(path, options?): T
|
|
2573
2589
|
```
|
|
2574
2590
|
|
|
2575
|
-
Defined in: [packages/fs/src/read/read-json-sync.ts:8](https://github.com/visulima/visulima/blob/
|
|
2591
|
+
Defined in: [packages/fs/src/read/read-json-sync.ts:8](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/read/read-json-sync.ts#L8)
|
|
2576
2592
|
|
|
2577
2593
|
##### Type Parameters
|
|
2578
2594
|
|
|
@@ -2601,7 +2617,7 @@ function readJsonSync<T>(
|
|
|
2601
2617
|
options?): T
|
|
2602
2618
|
```
|
|
2603
2619
|
|
|
2604
|
-
Defined in: [packages/fs/src/read/read-json-sync.ts:10](https://github.com/visulima/visulima/blob/
|
|
2620
|
+
Defined in: [packages/fs/src/read/read-json-sync.ts:10](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/read/read-json-sync.ts#L10)
|
|
2605
2621
|
|
|
2606
2622
|
##### Type Parameters
|
|
2607
2623
|
|
|
@@ -2627,139 +2643,13 @@ Defined in: [packages/fs/src/read/read-json-sync.ts:10](https://github.com/visul
|
|
|
2627
2643
|
|
|
2628
2644
|
***
|
|
2629
2645
|
|
|
2630
|
-
### readYaml()
|
|
2631
|
-
|
|
2632
|
-
#### Call Signature
|
|
2633
|
-
|
|
2634
|
-
```ts
|
|
2635
|
-
function readYaml<R>(path, options?): Promise<R>
|
|
2636
|
-
```
|
|
2637
|
-
|
|
2638
|
-
Defined in: [packages/fs/src/read/read-yaml.ts:6](https://github.com/visulima/visulima/blob/ef69679783adf001801f651ab061317bdcb4d5a2/packages/fs/src/read/read-yaml.ts#L6)
|
|
2639
|
-
|
|
2640
|
-
##### Type Parameters
|
|
2641
|
-
|
|
2642
|
-
• **R** = `Record`\<`string`, `unknown`\>
|
|
2643
|
-
|
|
2644
|
-
##### Parameters
|
|
2645
|
-
|
|
2646
|
-
###### path
|
|
2647
|
-
|
|
2648
|
-
`string` | `URL`
|
|
2649
|
-
|
|
2650
|
-
###### options?
|
|
2651
|
-
|
|
2652
|
-
`ReadYamlOptions`\<`"brotli"` \| `"gzip"` \| `"none"`\>
|
|
2653
|
-
|
|
2654
|
-
##### Returns
|
|
2655
|
-
|
|
2656
|
-
`Promise`\<`R`\>
|
|
2657
|
-
|
|
2658
|
-
#### Call Signature
|
|
2659
|
-
|
|
2660
|
-
```ts
|
|
2661
|
-
function readYaml<R>(
|
|
2662
|
-
path,
|
|
2663
|
-
reviver?,
|
|
2664
|
-
options?): Promise<R>
|
|
2665
|
-
```
|
|
2666
|
-
|
|
2667
|
-
Defined in: [packages/fs/src/read/read-yaml.ts:7](https://github.com/visulima/visulima/blob/ef69679783adf001801f651ab061317bdcb4d5a2/packages/fs/src/read/read-yaml.ts#L7)
|
|
2668
|
-
|
|
2669
|
-
##### Type Parameters
|
|
2670
|
-
|
|
2671
|
-
• **R** = `Record`\<`string`, `unknown`\>
|
|
2672
|
-
|
|
2673
|
-
##### Parameters
|
|
2674
|
-
|
|
2675
|
-
###### path
|
|
2676
|
-
|
|
2677
|
-
`string` | `URL`
|
|
2678
|
-
|
|
2679
|
-
###### reviver?
|
|
2680
|
-
|
|
2681
|
-
`YamlReviver`
|
|
2682
|
-
|
|
2683
|
-
###### options?
|
|
2684
|
-
|
|
2685
|
-
`ReadYamlOptions`\<`"brotli"` \| `"gzip"` \| `"none"`\>
|
|
2686
|
-
|
|
2687
|
-
##### Returns
|
|
2688
|
-
|
|
2689
|
-
`Promise`\<`R`\>
|
|
2690
|
-
|
|
2691
|
-
***
|
|
2692
|
-
|
|
2693
|
-
### readYamlSync()
|
|
2694
|
-
|
|
2695
|
-
#### Call Signature
|
|
2696
|
-
|
|
2697
|
-
```ts
|
|
2698
|
-
function readYamlSync<R>(path, options?): R
|
|
2699
|
-
```
|
|
2700
|
-
|
|
2701
|
-
Defined in: [packages/fs/src/read/read-yaml-sync.ts:6](https://github.com/visulima/visulima/blob/ef69679783adf001801f651ab061317bdcb4d5a2/packages/fs/src/read/read-yaml-sync.ts#L6)
|
|
2702
|
-
|
|
2703
|
-
##### Type Parameters
|
|
2704
|
-
|
|
2705
|
-
• **R** = `Record`\<`string`, `unknown`\>
|
|
2706
|
-
|
|
2707
|
-
##### Parameters
|
|
2708
|
-
|
|
2709
|
-
###### path
|
|
2710
|
-
|
|
2711
|
-
`string` | `URL`
|
|
2712
|
-
|
|
2713
|
-
###### options?
|
|
2714
|
-
|
|
2715
|
-
`ReadYamlOptions`\<`"brotli"` \| `"gzip"` \| `"none"`\>
|
|
2716
|
-
|
|
2717
|
-
##### Returns
|
|
2718
|
-
|
|
2719
|
-
`R`
|
|
2720
|
-
|
|
2721
|
-
#### Call Signature
|
|
2722
|
-
|
|
2723
|
-
```ts
|
|
2724
|
-
function readYamlSync<R>(
|
|
2725
|
-
path,
|
|
2726
|
-
reviver?,
|
|
2727
|
-
options?): R
|
|
2728
|
-
```
|
|
2729
|
-
|
|
2730
|
-
Defined in: [packages/fs/src/read/read-yaml-sync.ts:7](https://github.com/visulima/visulima/blob/ef69679783adf001801f651ab061317bdcb4d5a2/packages/fs/src/read/read-yaml-sync.ts#L7)
|
|
2731
|
-
|
|
2732
|
-
##### Type Parameters
|
|
2733
|
-
|
|
2734
|
-
• **R** = `Record`\<`string`, `unknown`\>
|
|
2735
|
-
|
|
2736
|
-
##### Parameters
|
|
2737
|
-
|
|
2738
|
-
###### path
|
|
2739
|
-
|
|
2740
|
-
`string` | `URL`
|
|
2741
|
-
|
|
2742
|
-
###### reviver?
|
|
2743
|
-
|
|
2744
|
-
`YamlReviver`
|
|
2745
|
-
|
|
2746
|
-
###### options?
|
|
2747
|
-
|
|
2748
|
-
`ReadYamlOptions`\<`"brotli"` \| `"gzip"` \| `"none"`\>
|
|
2749
|
-
|
|
2750
|
-
##### Returns
|
|
2751
|
-
|
|
2752
|
-
`R`
|
|
2753
|
-
|
|
2754
|
-
***
|
|
2755
|
-
|
|
2756
2646
|
### remove()
|
|
2757
2647
|
|
|
2758
2648
|
```ts
|
|
2759
2649
|
function remove(path, options): Promise<void>
|
|
2760
2650
|
```
|
|
2761
2651
|
|
|
2762
|
-
Defined in: [packages/fs/src/remove/remove.ts:5](https://github.com/visulima/visulima/blob/
|
|
2652
|
+
Defined in: [packages/fs/src/remove/remove.ts:5](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/remove/remove.ts#L5)
|
|
2763
2653
|
|
|
2764
2654
|
#### Parameters
|
|
2765
2655
|
|
|
@@ -2810,7 +2700,7 @@ This option is ignored if the `recursive` option is not `true`.
|
|
|
2810
2700
|
function removeSync(path, options): void
|
|
2811
2701
|
```
|
|
2812
2702
|
|
|
2813
|
-
Defined in: [packages/fs/src/remove/remove-sync.ts:5](https://github.com/visulima/visulima/blob/
|
|
2703
|
+
Defined in: [packages/fs/src/remove/remove-sync.ts:5](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/remove/remove-sync.ts#L5)
|
|
2814
2704
|
|
|
2815
2705
|
#### Parameters
|
|
2816
2706
|
|
|
@@ -2864,7 +2754,7 @@ function rename(
|
|
|
2864
2754
|
options?): Promise<void>
|
|
2865
2755
|
```
|
|
2866
2756
|
|
|
2867
|
-
Defined in: [packages/fs/src/move/index.ts:85](https://github.com/visulima/visulima/blob/
|
|
2757
|
+
Defined in: [packages/fs/src/move/index.ts:85](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/move/index.ts#L85)
|
|
2868
2758
|
|
|
2869
2759
|
Rename a file asynchronously.
|
|
2870
2760
|
|
|
@@ -2914,7 +2804,7 @@ function renameSync(
|
|
|
2914
2804
|
options?): void
|
|
2915
2805
|
```
|
|
2916
2806
|
|
|
2917
|
-
Defined in: [packages/fs/src/move/index.ts:109](https://github.com/visulima/visulima/blob/
|
|
2807
|
+
Defined in: [packages/fs/src/move/index.ts:109](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/move/index.ts#L109)
|
|
2918
2808
|
|
|
2919
2809
|
Rename a file synchronously.
|
|
2920
2810
|
|
|
@@ -2961,7 +2851,7 @@ console.log('The file has been renamed');
|
|
|
2961
2851
|
function walk(directory, __namedParameters): AsyncIterableIterator<WalkEntry>
|
|
2962
2852
|
```
|
|
2963
2853
|
|
|
2964
|
-
Defined in: [packages/fs/src/find/walk.ts:52](https://github.com/visulima/visulima/blob/
|
|
2854
|
+
Defined in: [packages/fs/src/find/walk.ts:52](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/find/walk.ts#L52)
|
|
2965
2855
|
|
|
2966
2856
|
Walks the file tree rooted at root, yielding each file or directory in the
|
|
2967
2857
|
tree filtered according to the given options.
|
|
@@ -2997,7 +2887,7 @@ Options:
|
|
|
2997
2887
|
function walkSync(directory, __namedParameters): IterableIterator<WalkEntry>
|
|
2998
2888
|
```
|
|
2999
2889
|
|
|
3000
|
-
Defined in: [packages/fs/src/find/walk-sync.ts:40](https://github.com/visulima/visulima/blob/
|
|
2890
|
+
Defined in: [packages/fs/src/find/walk-sync.ts:40](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/find/walk-sync.ts#L40)
|
|
3001
2891
|
|
|
3002
2892
|
Same as [`walk`](index.md#walk) but uses synchronous ops
|
|
3003
2893
|
|
|
@@ -3026,7 +2916,7 @@ function writeFile(
|
|
|
3026
2916
|
options?): Promise<void>
|
|
3027
2917
|
```
|
|
3028
2918
|
|
|
3029
|
-
Defined in: [packages/fs/src/write/write-file.ts:15](https://github.com/visulima/visulima/blob/
|
|
2919
|
+
Defined in: [packages/fs/src/write/write-file.ts:15](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/write/write-file.ts#L15)
|
|
3030
2920
|
|
|
3031
2921
|
#### Parameters
|
|
3032
2922
|
|
|
@@ -3057,7 +2947,7 @@ function writeFileSync(
|
|
|
3057
2947
|
options?): void
|
|
3058
2948
|
```
|
|
3059
2949
|
|
|
3060
|
-
Defined in: [packages/fs/src/write/write-file-sync.ts:15](https://github.com/visulima/visulima/blob/
|
|
2950
|
+
Defined in: [packages/fs/src/write/write-file-sync.ts:15](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/write/write-file-sync.ts#L15)
|
|
3061
2951
|
|
|
3062
2952
|
#### Parameters
|
|
3063
2953
|
|
|
@@ -3088,7 +2978,7 @@ function writeJson(
|
|
|
3088
2978
|
options): Promise<void>
|
|
3089
2979
|
```
|
|
3090
2980
|
|
|
3091
|
-
Defined in: [packages/fs/src/write/write-json.ts:11](https://github.com/visulima/visulima/blob/
|
|
2981
|
+
Defined in: [packages/fs/src/write/write-json.ts:11](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/write/write-json.ts#L11)
|
|
3092
2982
|
|
|
3093
2983
|
#### Parameters
|
|
3094
2984
|
|
|
@@ -3119,7 +3009,7 @@ function writeJsonSync(
|
|
|
3119
3009
|
options): void
|
|
3120
3010
|
```
|
|
3121
3011
|
|
|
3122
|
-
Defined in: [packages/fs/src/write/write-json-sync.ts:11](https://github.com/visulima/visulima/blob/
|
|
3012
|
+
Defined in: [packages/fs/src/write/write-json-sync.ts:11](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/write/write-json-sync.ts#L11)
|
|
3123
3013
|
|
|
3124
3014
|
#### Parameters
|
|
3125
3015
|
|
|
@@ -3139,256 +3029,122 @@ Defined in: [packages/fs/src/write/write-json-sync.ts:11](https://github.com/vis
|
|
|
3139
3029
|
|
|
3140
3030
|
`void`
|
|
3141
3031
|
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
### writeYaml()
|
|
3032
|
+
## Variables
|
|
3145
3033
|
|
|
3146
|
-
|
|
3034
|
+
### CRLF
|
|
3147
3035
|
|
|
3148
3036
|
```ts
|
|
3149
|
-
|
|
3150
|
-
path,
|
|
3151
|
-
data,
|
|
3152
|
-
options?): Promise<void>
|
|
3037
|
+
const CRLF: "\r\n";
|
|
3153
3038
|
```
|
|
3154
3039
|
|
|
3155
|
-
Defined in: [packages/fs/src/
|
|
3040
|
+
Defined in: [packages/fs/src/eol.ts:9](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/eol.ts#L9)
|
|
3156
3041
|
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
###### path
|
|
3160
|
-
|
|
3161
|
-
`string` | `URL`
|
|
3042
|
+
End-of-line character for Windows platforms.
|
|
3162
3043
|
|
|
3163
|
-
|
|
3044
|
+
***
|
|
3164
3045
|
|
|
3165
|
-
|
|
3046
|
+
### EOL
|
|
3166
3047
|
|
|
3167
|
-
|
|
3048
|
+
```ts
|
|
3049
|
+
const EOL: "\n" | "\r\n";
|
|
3050
|
+
```
|
|
3168
3051
|
|
|
3169
|
-
|
|
3052
|
+
Defined in: [packages/fs/src/eol.ts:14](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/eol.ts#L14)
|
|
3170
3053
|
|
|
3171
|
-
|
|
3054
|
+
End-of-line character evaluated for the current platform.
|
|
3172
3055
|
|
|
3173
|
-
|
|
3056
|
+
***
|
|
3174
3057
|
|
|
3175
|
-
|
|
3058
|
+
### F\_OK
|
|
3176
3059
|
|
|
3177
3060
|
```ts
|
|
3178
|
-
|
|
3179
|
-
path,
|
|
3180
|
-
data,
|
|
3181
|
-
replacer?,
|
|
3182
|
-
options?): Promise<void>
|
|
3061
|
+
const F_OK: 0 = 0;
|
|
3183
3062
|
```
|
|
3184
3063
|
|
|
3185
|
-
Defined in: [packages/fs/src/
|
|
3186
|
-
|
|
3187
|
-
##### Parameters
|
|
3064
|
+
Defined in: [packages/fs/src/constants.ts:2](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/constants.ts#L2)
|
|
3188
3065
|
|
|
3189
|
-
|
|
3066
|
+
Is the path visible to the calling process?
|
|
3190
3067
|
|
|
3191
|
-
|
|
3068
|
+
***
|
|
3192
3069
|
|
|
3193
|
-
|
|
3070
|
+
### FIND\_UP\_STOP
|
|
3194
3071
|
|
|
3195
|
-
|
|
3072
|
+
```ts
|
|
3073
|
+
const FIND_UP_STOP: typeof FIND_UP_STOP;
|
|
3074
|
+
```
|
|
3196
3075
|
|
|
3197
|
-
|
|
3076
|
+
Defined in: [packages/fs/src/constants.ts:13](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/constants.ts#L13)
|
|
3198
3077
|
|
|
3199
|
-
|
|
3078
|
+
***
|
|
3200
3079
|
|
|
3201
|
-
|
|
3080
|
+
### LF
|
|
3202
3081
|
|
|
3203
|
-
|
|
3082
|
+
```ts
|
|
3083
|
+
const LF: "\n";
|
|
3084
|
+
```
|
|
3204
3085
|
|
|
3205
|
-
|
|
3086
|
+
Defined in: [packages/fs/src/eol.ts:6](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/eol.ts#L6)
|
|
3206
3087
|
|
|
3207
|
-
|
|
3088
|
+
End-of-line character for POSIX platforms such as macOS and Linux.
|
|
3208
3089
|
|
|
3209
3090
|
***
|
|
3210
3091
|
|
|
3211
|
-
###
|
|
3212
|
-
|
|
3213
|
-
#### Call Signature
|
|
3092
|
+
### R\_OK
|
|
3214
3093
|
|
|
3215
3094
|
```ts
|
|
3216
|
-
|
|
3217
|
-
path,
|
|
3218
|
-
data,
|
|
3219
|
-
options?): void
|
|
3095
|
+
const R_OK: 4 = 4;
|
|
3220
3096
|
```
|
|
3221
3097
|
|
|
3222
|
-
Defined in: [packages/fs/src/
|
|
3223
|
-
|
|
3224
|
-
##### Parameters
|
|
3225
|
-
|
|
3226
|
-
###### path
|
|
3098
|
+
Defined in: [packages/fs/src/constants.ts:5](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/constants.ts#L5)
|
|
3227
3099
|
|
|
3228
|
-
|
|
3100
|
+
Is the path readable to the calling process?
|
|
3229
3101
|
|
|
3230
|
-
|
|
3102
|
+
***
|
|
3231
3103
|
|
|
3232
|
-
|
|
3104
|
+
### W\_OK
|
|
3233
3105
|
|
|
3234
|
-
|
|
3106
|
+
```ts
|
|
3107
|
+
const W_OK: 2 = 2;
|
|
3108
|
+
```
|
|
3235
3109
|
|
|
3236
|
-
|
|
3110
|
+
Defined in: [packages/fs/src/constants.ts:8](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/constants.ts#L8)
|
|
3237
3111
|
|
|
3238
|
-
|
|
3112
|
+
Is the path writable to the calling process?
|
|
3239
3113
|
|
|
3240
|
-
|
|
3114
|
+
***
|
|
3241
3115
|
|
|
3242
|
-
|
|
3116
|
+
### X\_OK
|
|
3243
3117
|
|
|
3244
3118
|
```ts
|
|
3245
|
-
|
|
3246
|
-
path,
|
|
3247
|
-
data,
|
|
3248
|
-
replacer?,
|
|
3249
|
-
options?): void
|
|
3119
|
+
const X_OK: 1 = 1;
|
|
3250
3120
|
```
|
|
3251
3121
|
|
|
3252
|
-
Defined in: [packages/fs/src/
|
|
3122
|
+
Defined in: [packages/fs/src/constants.ts:11](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/constants.ts#L11)
|
|
3253
3123
|
|
|
3254
|
-
|
|
3124
|
+
Is the path executable to the calling process?
|
|
3255
3125
|
|
|
3256
|
-
|
|
3126
|
+
## Interfaces
|
|
3257
3127
|
|
|
3258
|
-
|
|
3128
|
+
### WalkEntry
|
|
3259
3129
|
|
|
3260
|
-
|
|
3130
|
+
Defined in: [packages/fs/src/types.ts:56](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/types.ts#L56)
|
|
3261
3131
|
|
|
3262
|
-
|
|
3132
|
+
#### Extends
|
|
3263
3133
|
|
|
3264
|
-
|
|
3134
|
+
- `Pick`\<`Dirent`, `"isDirectory"` \| `"isFile"` \| `"isSymbolicLink"` \| `"name"`\>
|
|
3265
3135
|
|
|
3266
|
-
|
|
3136
|
+
#### Methods
|
|
3267
3137
|
|
|
3268
|
-
|
|
3138
|
+
##### isDirectory()
|
|
3269
3139
|
|
|
3270
|
-
|
|
3140
|
+
```ts
|
|
3141
|
+
isDirectory(): boolean
|
|
3142
|
+
```
|
|
3271
3143
|
|
|
3272
|
-
|
|
3144
|
+
Defined in: node\_modules/.pnpm/@types+node@18.19.71/node\_modules/@types/node/fs.d.ts:190
|
|
3273
3145
|
|
|
3274
|
-
`
|
|
3275
|
-
|
|
3276
|
-
## Variables
|
|
3277
|
-
|
|
3278
|
-
### CRLF
|
|
3279
|
-
|
|
3280
|
-
```ts
|
|
3281
|
-
const CRLF: "\r\n";
|
|
3282
|
-
```
|
|
3283
|
-
|
|
3284
|
-
Defined in: [packages/fs/src/eol.ts:9](https://github.com/visulima/visulima/blob/ef69679783adf001801f651ab061317bdcb4d5a2/packages/fs/src/eol.ts#L9)
|
|
3285
|
-
|
|
3286
|
-
End-of-line character for Windows platforms.
|
|
3287
|
-
|
|
3288
|
-
***
|
|
3289
|
-
|
|
3290
|
-
### EOL
|
|
3291
|
-
|
|
3292
|
-
```ts
|
|
3293
|
-
const EOL: "\n" | "\r\n";
|
|
3294
|
-
```
|
|
3295
|
-
|
|
3296
|
-
Defined in: [packages/fs/src/eol.ts:14](https://github.com/visulima/visulima/blob/ef69679783adf001801f651ab061317bdcb4d5a2/packages/fs/src/eol.ts#L14)
|
|
3297
|
-
|
|
3298
|
-
End-of-line character evaluated for the current platform.
|
|
3299
|
-
|
|
3300
|
-
***
|
|
3301
|
-
|
|
3302
|
-
### F\_OK
|
|
3303
|
-
|
|
3304
|
-
```ts
|
|
3305
|
-
const F_OK: 0 = 0;
|
|
3306
|
-
```
|
|
3307
|
-
|
|
3308
|
-
Defined in: [packages/fs/src/constants.ts:2](https://github.com/visulima/visulima/blob/ef69679783adf001801f651ab061317bdcb4d5a2/packages/fs/src/constants.ts#L2)
|
|
3309
|
-
|
|
3310
|
-
Is the path visible to the calling process?
|
|
3311
|
-
|
|
3312
|
-
***
|
|
3313
|
-
|
|
3314
|
-
### FIND\_UP\_STOP
|
|
3315
|
-
|
|
3316
|
-
```ts
|
|
3317
|
-
const FIND_UP_STOP: typeof FIND_UP_STOP;
|
|
3318
|
-
```
|
|
3319
|
-
|
|
3320
|
-
Defined in: [packages/fs/src/constants.ts:13](https://github.com/visulima/visulima/blob/ef69679783adf001801f651ab061317bdcb4d5a2/packages/fs/src/constants.ts#L13)
|
|
3321
|
-
|
|
3322
|
-
***
|
|
3323
|
-
|
|
3324
|
-
### LF
|
|
3325
|
-
|
|
3326
|
-
```ts
|
|
3327
|
-
const LF: "\n";
|
|
3328
|
-
```
|
|
3329
|
-
|
|
3330
|
-
Defined in: [packages/fs/src/eol.ts:6](https://github.com/visulima/visulima/blob/ef69679783adf001801f651ab061317bdcb4d5a2/packages/fs/src/eol.ts#L6)
|
|
3331
|
-
|
|
3332
|
-
End-of-line character for POSIX platforms such as macOS and Linux.
|
|
3333
|
-
|
|
3334
|
-
***
|
|
3335
|
-
|
|
3336
|
-
### R\_OK
|
|
3337
|
-
|
|
3338
|
-
```ts
|
|
3339
|
-
const R_OK: 4 = 4;
|
|
3340
|
-
```
|
|
3341
|
-
|
|
3342
|
-
Defined in: [packages/fs/src/constants.ts:5](https://github.com/visulima/visulima/blob/ef69679783adf001801f651ab061317bdcb4d5a2/packages/fs/src/constants.ts#L5)
|
|
3343
|
-
|
|
3344
|
-
Is the path readable to the calling process?
|
|
3345
|
-
|
|
3346
|
-
***
|
|
3347
|
-
|
|
3348
|
-
### W\_OK
|
|
3349
|
-
|
|
3350
|
-
```ts
|
|
3351
|
-
const W_OK: 2 = 2;
|
|
3352
|
-
```
|
|
3353
|
-
|
|
3354
|
-
Defined in: [packages/fs/src/constants.ts:8](https://github.com/visulima/visulima/blob/ef69679783adf001801f651ab061317bdcb4d5a2/packages/fs/src/constants.ts#L8)
|
|
3355
|
-
|
|
3356
|
-
Is the path writable to the calling process?
|
|
3357
|
-
|
|
3358
|
-
***
|
|
3359
|
-
|
|
3360
|
-
### X\_OK
|
|
3361
|
-
|
|
3362
|
-
```ts
|
|
3363
|
-
const X_OK: 1 = 1;
|
|
3364
|
-
```
|
|
3365
|
-
|
|
3366
|
-
Defined in: [packages/fs/src/constants.ts:11](https://github.com/visulima/visulima/blob/ef69679783adf001801f651ab061317bdcb4d5a2/packages/fs/src/constants.ts#L11)
|
|
3367
|
-
|
|
3368
|
-
Is the path executable to the calling process?
|
|
3369
|
-
|
|
3370
|
-
## Interfaces
|
|
3371
|
-
|
|
3372
|
-
### WalkEntry
|
|
3373
|
-
|
|
3374
|
-
Defined in: [packages/fs/src/types.ts:56](https://github.com/visulima/visulima/blob/ef69679783adf001801f651ab061317bdcb4d5a2/packages/fs/src/types.ts#L56)
|
|
3375
|
-
|
|
3376
|
-
#### Extends
|
|
3377
|
-
|
|
3378
|
-
- `Pick`\<`Dirent`, `"isDirectory"` \| `"isFile"` \| `"isSymbolicLink"` \| `"name"`\>
|
|
3379
|
-
|
|
3380
|
-
#### Methods
|
|
3381
|
-
|
|
3382
|
-
##### isDirectory()
|
|
3383
|
-
|
|
3384
|
-
```ts
|
|
3385
|
-
isDirectory(): boolean
|
|
3386
|
-
```
|
|
3387
|
-
|
|
3388
|
-
Defined in: node\_modules/.pnpm/@types+node@18.19.71/node\_modules/@types/node/fs.d.ts:190
|
|
3389
|
-
|
|
3390
|
-
Returns `true` if the `fs.Dirent` object describes a file system
|
|
3391
|
-
directory.
|
|
3146
|
+
Returns `true` if the `fs.Dirent` object describes a file system
|
|
3147
|
+
directory.
|
|
3392
3148
|
|
|
3393
3149
|
###### Returns
|
|
3394
3150
|
|
|
@@ -3481,13 +3237,13 @@ Pick.name
|
|
|
3481
3237
|
path: string;
|
|
3482
3238
|
```
|
|
3483
3239
|
|
|
3484
|
-
Defined in: [packages/fs/src/types.ts:57](https://github.com/visulima/visulima/blob/
|
|
3240
|
+
Defined in: [packages/fs/src/types.ts:57](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/types.ts#L57)
|
|
3485
3241
|
|
|
3486
3242
|
***
|
|
3487
3243
|
|
|
3488
3244
|
### WalkOptions
|
|
3489
3245
|
|
|
3490
|
-
Defined in: [packages/fs/src/types.ts:9](https://github.com/visulima/visulima/blob/
|
|
3246
|
+
Defined in: [packages/fs/src/types.ts:9](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/types.ts#L9)
|
|
3491
3247
|
|
|
3492
3248
|
#### Properties
|
|
3493
3249
|
|
|
@@ -3497,7 +3253,7 @@ Defined in: [packages/fs/src/types.ts:9](https://github.com/visulima/visulima/bl
|
|
|
3497
3253
|
optional extensions: string[];
|
|
3498
3254
|
```
|
|
3499
3255
|
|
|
3500
|
-
Defined in: [packages/fs/src/types.ts:15](https://github.com/visulima/visulima/blob/
|
|
3256
|
+
Defined in: [packages/fs/src/types.ts:15](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/types.ts#L15)
|
|
3501
3257
|
|
|
3502
3258
|
List of file extensions used to filter entries.
|
|
3503
3259
|
If specified, entries without the file extension specified by this option are excluded.
|
|
@@ -3514,7 +3270,7 @@ If specified, entries without the file extension specified by this option are ex
|
|
|
3514
3270
|
optional followSymlinks: boolean;
|
|
3515
3271
|
```
|
|
3516
3272
|
|
|
3517
|
-
Defined in: [packages/fs/src/types.ts:20](https://github.com/visulima/visulima/blob/
|
|
3273
|
+
Defined in: [packages/fs/src/types.ts:20](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/types.ts#L20)
|
|
3518
3274
|
|
|
3519
3275
|
Indicates whether symlinks should be resolved or not.
|
|
3520
3276
|
|
|
@@ -3530,7 +3286,7 @@ Indicates whether symlinks should be resolved or not.
|
|
|
3530
3286
|
optional includeDirs: boolean;
|
|
3531
3287
|
```
|
|
3532
3288
|
|
|
3533
|
-
Defined in: [packages/fs/src/types.ts:25](https://github.com/visulima/visulima/blob/
|
|
3289
|
+
Defined in: [packages/fs/src/types.ts:25](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/types.ts#L25)
|
|
3534
3290
|
|
|
3535
3291
|
Indicates whether directory entries should be included or not.
|
|
3536
3292
|
|
|
@@ -3546,7 +3302,7 @@ Indicates whether directory entries should be included or not.
|
|
|
3546
3302
|
optional includeFiles: boolean;
|
|
3547
3303
|
```
|
|
3548
3304
|
|
|
3549
|
-
Defined in: [packages/fs/src/types.ts:30](https://github.com/visulima/visulima/blob/
|
|
3305
|
+
Defined in: [packages/fs/src/types.ts:30](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/types.ts#L30)
|
|
3550
3306
|
|
|
3551
3307
|
Indicates whether file entries should be included or not.
|
|
3552
3308
|
|
|
@@ -3562,7 +3318,7 @@ Indicates whether file entries should be included or not.
|
|
|
3562
3318
|
optional includeSymlinks: boolean;
|
|
3563
3319
|
```
|
|
3564
3320
|
|
|
3565
|
-
Defined in: [packages/fs/src/types.ts:36](https://github.com/visulima/visulima/blob/
|
|
3321
|
+
Defined in: [packages/fs/src/types.ts:36](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/types.ts#L36)
|
|
3566
3322
|
|
|
3567
3323
|
Indicates whether symlink entries should be included or not.
|
|
3568
3324
|
This option is meaningful only if `followSymlinks` is set to `false`.
|
|
@@ -3579,7 +3335,7 @@ This option is meaningful only if `followSymlinks` is set to `false`.
|
|
|
3579
3335
|
optional match: (string | RegExp)[];
|
|
3580
3336
|
```
|
|
3581
3337
|
|
|
3582
|
-
Defined in: [packages/fs/src/types.ts:42](https://github.com/visulima/visulima/blob/
|
|
3338
|
+
Defined in: [packages/fs/src/types.ts:42](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/types.ts#L42)
|
|
3583
3339
|
|
|
3584
3340
|
List of regular expression or glob patterns used to filter entries.
|
|
3585
3341
|
If specified, entries that do not match the patterns specified by this option are excluded.
|
|
@@ -3596,7 +3352,7 @@ If specified, entries that do not match the patterns specified by this option ar
|
|
|
3596
3352
|
optional maxDepth: number;
|
|
3597
3353
|
```
|
|
3598
3354
|
|
|
3599
|
-
Defined in: [packages/fs/src/types.ts:47](https://github.com/visulima/visulima/blob/
|
|
3355
|
+
Defined in: [packages/fs/src/types.ts:47](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/types.ts#L47)
|
|
3600
3356
|
|
|
3601
3357
|
The maximum depth of the file tree to be walked recursively.
|
|
3602
3358
|
|
|
@@ -3612,7 +3368,7 @@ The maximum depth of the file tree to be walked recursively.
|
|
|
3612
3368
|
optional skip: (string | RegExp)[];
|
|
3613
3369
|
```
|
|
3614
3370
|
|
|
3615
|
-
Defined in: [packages/fs/src/types.ts:53](https://github.com/visulima/visulima/blob/
|
|
3371
|
+
Defined in: [packages/fs/src/types.ts:53](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/types.ts#L53)
|
|
3616
3372
|
|
|
3617
3373
|
List of regular expression or glob patterns used to filter entries.
|
|
3618
3374
|
If specified, entries matching the patterns specified by this option are excluded.
|
|
@@ -3631,7 +3387,7 @@ If specified, entries matching the patterns specified by this option are exclude
|
|
|
3631
3387
|
type CodeFrameLocation = object;
|
|
3632
3388
|
```
|
|
3633
3389
|
|
|
3634
|
-
Defined in: [packages/fs/src/types.ts:91](https://github.com/visulima/visulima/blob/
|
|
3390
|
+
Defined in: [packages/fs/src/types.ts:91](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/types.ts#L91)
|
|
3635
3391
|
|
|
3636
3392
|
#### Type declaration
|
|
3637
3393
|
|
|
@@ -3655,7 +3411,7 @@ line: number;
|
|
|
3655
3411
|
type EmptyDirOptions = object;
|
|
3656
3412
|
```
|
|
3657
3413
|
|
|
3658
|
-
Defined in: [packages/fs/src/types.ts:188](https://github.com/visulima/visulima/blob/
|
|
3414
|
+
Defined in: [packages/fs/src/types.ts:188](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/types.ts#L188)
|
|
3659
3415
|
|
|
3660
3416
|
#### Type declaration
|
|
3661
3417
|
|
|
@@ -3703,7 +3459,7 @@ type FindUpName =
|
|
|
3703
3459
|
| (directory) => FindUpNameFnResult;
|
|
3704
3460
|
```
|
|
3705
3461
|
|
|
3706
|
-
Defined in: [packages/fs/src/types.ts:180](https://github.com/visulima/visulima/blob/
|
|
3462
|
+
Defined in: [packages/fs/src/types.ts:180](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/types.ts#L180)
|
|
3707
3463
|
|
|
3708
3464
|
***
|
|
3709
3465
|
|
|
@@ -3717,7 +3473,7 @@ type FindUpNameFnResult =
|
|
|
3717
3473
|
| undefined;
|
|
3718
3474
|
```
|
|
3719
3475
|
|
|
3720
|
-
Defined in: [packages/fs/src/types.ts:178](https://github.com/visulima/visulima/blob/
|
|
3476
|
+
Defined in: [packages/fs/src/types.ts:178](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/types.ts#L178)
|
|
3721
3477
|
|
|
3722
3478
|
***
|
|
3723
3479
|
|
|
@@ -3730,7 +3486,7 @@ type FindUpNameSync =
|
|
|
3730
3486
|
| (directory) => FindUpNameSyncFnResult;
|
|
3731
3487
|
```
|
|
3732
3488
|
|
|
3733
|
-
Defined in: [packages/fs/src/types.ts:185](https://github.com/visulima/visulima/blob/
|
|
3489
|
+
Defined in: [packages/fs/src/types.ts:185](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/types.ts#L185)
|
|
3734
3490
|
|
|
3735
3491
|
***
|
|
3736
3492
|
|
|
@@ -3740,7 +3496,7 @@ Defined in: [packages/fs/src/types.ts:185](https://github.com/visulima/visulima/
|
|
|
3740
3496
|
type FindUpNameSyncFnResult = PathLike | typeof FIND_UP_STOP | undefined;
|
|
3741
3497
|
```
|
|
3742
3498
|
|
|
3743
|
-
Defined in: [packages/fs/src/types.ts:183](https://github.com/visulima/visulima/blob/
|
|
3499
|
+
Defined in: [packages/fs/src/types.ts:183](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/types.ts#L183)
|
|
3744
3500
|
|
|
3745
3501
|
***
|
|
3746
3502
|
|
|
@@ -3750,7 +3506,7 @@ Defined in: [packages/fs/src/types.ts:183](https://github.com/visulima/visulima/
|
|
|
3750
3506
|
type FindUpOptions = object;
|
|
3751
3507
|
```
|
|
3752
3508
|
|
|
3753
|
-
Defined in: [packages/fs/src/types.ts:170](https://github.com/visulima/visulima/blob/
|
|
3509
|
+
Defined in: [packages/fs/src/types.ts:170](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/types.ts#L170)
|
|
3754
3510
|
|
|
3755
3511
|
#### Type declaration
|
|
3756
3512
|
|
|
@@ -3786,7 +3542,7 @@ optional type: "directory" | "file";
|
|
|
3786
3542
|
type JsonReplacer = (number | string)[] | (this, key, value) => unknown | null;
|
|
3787
3543
|
```
|
|
3788
3544
|
|
|
3789
|
-
Defined in: [packages/fs/src/types.ts:143](https://github.com/visulima/visulima/blob/
|
|
3545
|
+
Defined in: [packages/fs/src/types.ts:143](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/types.ts#L143)
|
|
3790
3546
|
|
|
3791
3547
|
***
|
|
3792
3548
|
|
|
@@ -3796,7 +3552,7 @@ Defined in: [packages/fs/src/types.ts:143](https://github.com/visulima/visulima/
|
|
|
3796
3552
|
type JsonReviver = Parameters<typeof JSON["parse"]>["1"];
|
|
3797
3553
|
```
|
|
3798
3554
|
|
|
3799
|
-
Defined in: [packages/fs/src/types.ts:89](https://github.com/visulima/visulima/blob/
|
|
3555
|
+
Defined in: [packages/fs/src/types.ts:89](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/types.ts#L89)
|
|
3800
3556
|
|
|
3801
3557
|
***
|
|
3802
3558
|
|
|
@@ -3806,7 +3562,7 @@ Defined in: [packages/fs/src/types.ts:89](https://github.com/visulima/visulima/b
|
|
|
3806
3562
|
type MoveOptions = object;
|
|
3807
3563
|
```
|
|
3808
3564
|
|
|
3809
|
-
Defined in: [packages/fs/src/move/types.ts:3](https://github.com/visulima/visulima/blob/
|
|
3565
|
+
Defined in: [packages/fs/src/move/types.ts:3](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/move/types.ts#L3)
|
|
3810
3566
|
|
|
3811
3567
|
#### Type declaration
|
|
3812
3568
|
|
|
@@ -3874,7 +3630,7 @@ type ReadFileEncoding =
|
|
|
3874
3630
|
| "utf16le";
|
|
3875
3631
|
```
|
|
3876
3632
|
|
|
3877
|
-
Defined in: [packages/fs/src/types.ts:61](https://github.com/visulima/visulima/blob/
|
|
3633
|
+
Defined in: [packages/fs/src/types.ts:61](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/types.ts#L61)
|
|
3878
3634
|
|
|
3879
3635
|
***
|
|
3880
3636
|
|
|
@@ -3884,7 +3640,7 @@ Defined in: [packages/fs/src/types.ts:61](https://github.com/visulima/visulima/b
|
|
|
3884
3640
|
type ReadFileOptions<C> = object;
|
|
3885
3641
|
```
|
|
3886
3642
|
|
|
3887
|
-
Defined in: [packages/fs/src/types.ts:63](https://github.com/visulima/visulima/blob/
|
|
3643
|
+
Defined in: [packages/fs/src/types.ts:63](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/types.ts#L63)
|
|
3888
3644
|
|
|
3889
3645
|
#### Type Parameters
|
|
3890
3646
|
|
|
@@ -3936,7 +3692,7 @@ The flag used to open the file. Default: `r`
|
|
|
3936
3692
|
type ReadJsonOptions = CodeFrameOptions & object;
|
|
3937
3693
|
```
|
|
3938
3694
|
|
|
3939
|
-
Defined in: [packages/fs/src/types.ts:104](https://github.com/visulima/visulima/blob/
|
|
3695
|
+
Defined in: [packages/fs/src/types.ts:104](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/types.ts#L104)
|
|
3940
3696
|
|
|
3941
3697
|
#### Type declaration
|
|
3942
3698
|
|
|
@@ -3964,7 +3720,7 @@ optional beforeParse: (source) => string;
|
|
|
3964
3720
|
type WriteFileOptions = object;
|
|
3965
3721
|
```
|
|
3966
3722
|
|
|
3967
|
-
Defined in: [packages/fs/src/types.ts:108](https://github.com/visulima/visulima/blob/
|
|
3723
|
+
Defined in: [packages/fs/src/types.ts:108](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/types.ts#L108)
|
|
3968
3724
|
|
|
3969
3725
|
#### Type declaration
|
|
3970
3726
|
|
|
@@ -4036,7 +3792,7 @@ Recursively create parent directories if needed. Default: `true`
|
|
|
4036
3792
|
type WriteJsonOptions = WriteFileOptions & object;
|
|
4037
3793
|
```
|
|
4038
3794
|
|
|
4039
|
-
Defined in: [packages/fs/src/types.ts:146](https://github.com/visulima/visulima/blob/
|
|
3795
|
+
Defined in: [packages/fs/src/types.ts:146](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/types.ts#L146)
|
|
4040
3796
|
|
|
4041
3797
|
#### Type declaration
|
|
4042
3798
|
|
|
@@ -4091,23 +3847,13 @@ Override the default `JSON.stringify` method.
|
|
|
4091
3847
|
###### Returns
|
|
4092
3848
|
|
|
4093
3849
|
`string`
|
|
4094
|
-
|
|
4095
|
-
***
|
|
4096
|
-
|
|
4097
|
-
### YamlReplacer
|
|
4098
|
-
|
|
4099
|
-
```ts
|
|
4100
|
-
type YamlReplacer = JsonReplacer;
|
|
4101
|
-
```
|
|
4102
|
-
|
|
4103
|
-
Defined in: [packages/fs/src/types.ts:144](https://github.com/visulima/visulima/blob/ef69679783adf001801f651ab061317bdcb4d5a2/packages/fs/src/types.ts#L144)
|
|
4104
3850
|
# utils
|
|
4105
3851
|
|
|
4106
3852
|
## Classes
|
|
4107
3853
|
|
|
4108
3854
|
### JSONError
|
|
4109
3855
|
|
|
4110
|
-
Defined in: [packages/fs/src/error/json-error.ts:1](https://github.com/visulima/visulima/blob/
|
|
3856
|
+
Defined in: [packages/fs/src/error/json-error.ts:1](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/json-error.ts#L1)
|
|
4111
3857
|
|
|
4112
3858
|
#### Extends
|
|
4113
3859
|
|
|
@@ -4121,7 +3867,7 @@ Defined in: [packages/fs/src/error/json-error.ts:1](https://github.com/visulima/
|
|
|
4121
3867
|
new JSONError(message): JSONError
|
|
4122
3868
|
```
|
|
4123
3869
|
|
|
4124
|
-
Defined in: [packages/fs/src/error/json-error.ts:11](https://github.com/visulima/visulima/blob/
|
|
3870
|
+
Defined in: [packages/fs/src/error/json-error.ts:11](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/json-error.ts#L11)
|
|
4125
3871
|
|
|
4126
3872
|
###### Parameters
|
|
4127
3873
|
|
|
@@ -4149,7 +3895,7 @@ Error.constructor
|
|
|
4149
3895
|
get message(): string
|
|
4150
3896
|
```
|
|
4151
3897
|
|
|
4152
|
-
Defined in: [packages/fs/src/error/json-error.ts:21](https://github.com/visulima/visulima/blob/
|
|
3898
|
+
Defined in: [packages/fs/src/error/json-error.ts:21](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/json-error.ts#L21)
|
|
4153
3899
|
|
|
4154
3900
|
###### Returns
|
|
4155
3901
|
|
|
@@ -4161,7 +3907,7 @@ Defined in: [packages/fs/src/error/json-error.ts:21](https://github.com/visulima
|
|
|
4161
3907
|
set message(message): void
|
|
4162
3908
|
```
|
|
4163
3909
|
|
|
4164
|
-
Defined in: [packages/fs/src/error/json-error.ts:25](https://github.com/visulima/visulima/blob/
|
|
3910
|
+
Defined in: [packages/fs/src/error/json-error.ts:25](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/json-error.ts#L25)
|
|
4165
3911
|
|
|
4166
3912
|
###### Parameters
|
|
4167
3913
|
|
|
@@ -4233,7 +3979,7 @@ Error.cause
|
|
|
4233
3979
|
codeFrame: string;
|
|
4234
3980
|
```
|
|
4235
3981
|
|
|
4236
|
-
Defined in: [packages/fs/src/error/json-error.ts:4](https://github.com/visulima/visulima/blob/
|
|
3982
|
+
Defined in: [packages/fs/src/error/json-error.ts:4](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/json-error.ts#L4)
|
|
4237
3983
|
|
|
4238
3984
|
##### fileName
|
|
4239
3985
|
|
|
@@ -4241,7 +3987,7 @@ Defined in: [packages/fs/src/error/json-error.ts:4](https://github.com/visulima/
|
|
|
4241
3987
|
fileName: string;
|
|
4242
3988
|
```
|
|
4243
3989
|
|
|
4244
|
-
Defined in: [packages/fs/src/error/json-error.ts:2](https://github.com/visulima/visulima/blob/
|
|
3990
|
+
Defined in: [packages/fs/src/error/json-error.ts:2](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/json-error.ts#L2)
|
|
4245
3991
|
|
|
4246
3992
|
##### name
|
|
4247
3993
|
|
|
@@ -4249,7 +3995,7 @@ Defined in: [packages/fs/src/error/json-error.ts:2](https://github.com/visulima/
|
|
|
4249
3995
|
readonly name: "JSONError" = "JSONError";
|
|
4250
3996
|
```
|
|
4251
3997
|
|
|
4252
|
-
Defined in: [packages/fs/src/error/json-error.ts:7](https://github.com/visulima/visulima/blob/
|
|
3998
|
+
Defined in: [packages/fs/src/error/json-error.ts:7](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/error/json-error.ts#L7)
|
|
4253
3999
|
|
|
4254
4000
|
###### Overrides
|
|
4255
4001
|
|
|
@@ -4327,7 +4073,7 @@ Error.stackTraceLimit
|
|
|
4327
4073
|
function assertValidFileContents(contents): void
|
|
4328
4074
|
```
|
|
4329
4075
|
|
|
4330
|
-
Defined in: [packages/fs/src/utils/assert-valid-file-contents.ts:2](https://github.com/visulima/visulima/blob/
|
|
4076
|
+
Defined in: [packages/fs/src/utils/assert-valid-file-contents.ts:2](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/utils/assert-valid-file-contents.ts#L2)
|
|
4331
4077
|
|
|
4332
4078
|
#### Parameters
|
|
4333
4079
|
|
|
@@ -4347,7 +4093,7 @@ Defined in: [packages/fs/src/utils/assert-valid-file-contents.ts:2](https://gith
|
|
|
4347
4093
|
function assertValidFileOrDirectoryPath(fileOrDirectoryPath): void
|
|
4348
4094
|
```
|
|
4349
4095
|
|
|
4350
|
-
Defined in: [packages/fs/src/utils/assert-valid-file-or-directory-path.ts:2](https://github.com/visulima/visulima/blob/
|
|
4096
|
+
Defined in: [packages/fs/src/utils/assert-valid-file-or-directory-path.ts:2](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/utils/assert-valid-file-or-directory-path.ts#L2)
|
|
4351
4097
|
|
|
4352
4098
|
#### Parameters
|
|
4353
4099
|
|
|
@@ -4372,7 +4118,7 @@ function parseJson<T>(
|
|
|
4372
4118
|
options?): T
|
|
4373
4119
|
```
|
|
4374
4120
|
|
|
4375
|
-
Defined in: [packages/fs/src/utils/parse-json.ts:60](https://github.com/visulima/visulima/blob/
|
|
4121
|
+
Defined in: [packages/fs/src/utils/parse-json.ts:60](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/utils/parse-json.ts#L60)
|
|
4376
4122
|
|
|
4377
4123
|
##### Type Parameters
|
|
4378
4124
|
|
|
@@ -4406,7 +4152,7 @@ function parseJson<T>(
|
|
|
4406
4152
|
options?): T
|
|
4407
4153
|
```
|
|
4408
4154
|
|
|
4409
|
-
Defined in: [packages/fs/src/utils/parse-json.ts:61](https://github.com/visulima/visulima/blob/
|
|
4155
|
+
Defined in: [packages/fs/src/utils/parse-json.ts:61](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/utils/parse-json.ts#L61)
|
|
4410
4156
|
|
|
4411
4157
|
##### Type Parameters
|
|
4412
4158
|
|
|
@@ -4442,7 +4188,7 @@ Defined in: [packages/fs/src/utils/parse-json.ts:61](https://github.com/visulima
|
|
|
4442
4188
|
function stripJsonComments(jsonString, __namedParameters): string
|
|
4443
4189
|
```
|
|
4444
4190
|
|
|
4445
|
-
Defined in: [packages/fs/src/utils/strip-json-comments.ts:5](https://github.com/visulima/visulima/blob/
|
|
4191
|
+
Defined in: [packages/fs/src/utils/strip-json-comments.ts:5](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/utils/strip-json-comments.ts#L5)
|
|
4446
4192
|
|
|
4447
4193
|
#### Parameters
|
|
4448
4194
|
|
|
@@ -4479,6 +4225,277 @@ Defined in: node\_modules/.pnpm/@visulima+path@1.3.3/node\_modules/@visulima/pat
|
|
|
4479
4225
|
#### Returns
|
|
4480
4226
|
|
|
4481
4227
|
`string`
|
|
4228
|
+
# yaml
|
|
4229
|
+
|
|
4230
|
+
## Functions
|
|
4231
|
+
|
|
4232
|
+
### readYaml()
|
|
4233
|
+
|
|
4234
|
+
#### Call Signature
|
|
4235
|
+
|
|
4236
|
+
```ts
|
|
4237
|
+
function readYaml<R>(path, options?): Promise<R>
|
|
4238
|
+
```
|
|
4239
|
+
|
|
4240
|
+
Defined in: [packages/fs/src/read/read-yaml.ts:6](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/read/read-yaml.ts#L6)
|
|
4241
|
+
|
|
4242
|
+
##### Type Parameters
|
|
4243
|
+
|
|
4244
|
+
• **R** = `Record`\<`string`, `unknown`\>
|
|
4245
|
+
|
|
4246
|
+
##### Parameters
|
|
4247
|
+
|
|
4248
|
+
###### path
|
|
4249
|
+
|
|
4250
|
+
`string` | `URL`
|
|
4251
|
+
|
|
4252
|
+
###### options?
|
|
4253
|
+
|
|
4254
|
+
`ReadYamlOptions`\<`"brotli"` \| `"gzip"` \| `"none"`\>
|
|
4255
|
+
|
|
4256
|
+
##### Returns
|
|
4257
|
+
|
|
4258
|
+
`Promise`\<`R`\>
|
|
4259
|
+
|
|
4260
|
+
#### Call Signature
|
|
4261
|
+
|
|
4262
|
+
```ts
|
|
4263
|
+
function readYaml<R>(
|
|
4264
|
+
path,
|
|
4265
|
+
reviver?,
|
|
4266
|
+
options?): Promise<R>
|
|
4267
|
+
```
|
|
4268
|
+
|
|
4269
|
+
Defined in: [packages/fs/src/read/read-yaml.ts:7](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/read/read-yaml.ts#L7)
|
|
4270
|
+
|
|
4271
|
+
##### Type Parameters
|
|
4272
|
+
|
|
4273
|
+
• **R** = `Record`\<`string`, `unknown`\>
|
|
4274
|
+
|
|
4275
|
+
##### Parameters
|
|
4276
|
+
|
|
4277
|
+
###### path
|
|
4278
|
+
|
|
4279
|
+
`string` | `URL`
|
|
4280
|
+
|
|
4281
|
+
###### reviver?
|
|
4282
|
+
|
|
4283
|
+
`YamlReviver`
|
|
4284
|
+
|
|
4285
|
+
###### options?
|
|
4286
|
+
|
|
4287
|
+
`ReadYamlOptions`\<`"brotli"` \| `"gzip"` \| `"none"`\>
|
|
4288
|
+
|
|
4289
|
+
##### Returns
|
|
4290
|
+
|
|
4291
|
+
`Promise`\<`R`\>
|
|
4292
|
+
|
|
4293
|
+
***
|
|
4294
|
+
|
|
4295
|
+
### readYamlSync()
|
|
4296
|
+
|
|
4297
|
+
#### Call Signature
|
|
4298
|
+
|
|
4299
|
+
```ts
|
|
4300
|
+
function readYamlSync<R>(path, options?): R
|
|
4301
|
+
```
|
|
4302
|
+
|
|
4303
|
+
Defined in: [packages/fs/src/read/read-yaml-sync.ts:6](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/read/read-yaml-sync.ts#L6)
|
|
4304
|
+
|
|
4305
|
+
##### Type Parameters
|
|
4306
|
+
|
|
4307
|
+
• **R** = `Record`\<`string`, `unknown`\>
|
|
4308
|
+
|
|
4309
|
+
##### Parameters
|
|
4310
|
+
|
|
4311
|
+
###### path
|
|
4312
|
+
|
|
4313
|
+
`string` | `URL`
|
|
4314
|
+
|
|
4315
|
+
###### options?
|
|
4316
|
+
|
|
4317
|
+
`ReadYamlOptions`\<`"brotli"` \| `"gzip"` \| `"none"`\>
|
|
4318
|
+
|
|
4319
|
+
##### Returns
|
|
4320
|
+
|
|
4321
|
+
`R`
|
|
4322
|
+
|
|
4323
|
+
#### Call Signature
|
|
4324
|
+
|
|
4325
|
+
```ts
|
|
4326
|
+
function readYamlSync<R>(
|
|
4327
|
+
path,
|
|
4328
|
+
reviver?,
|
|
4329
|
+
options?): R
|
|
4330
|
+
```
|
|
4331
|
+
|
|
4332
|
+
Defined in: [packages/fs/src/read/read-yaml-sync.ts:7](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/read/read-yaml-sync.ts#L7)
|
|
4333
|
+
|
|
4334
|
+
##### Type Parameters
|
|
4335
|
+
|
|
4336
|
+
• **R** = `Record`\<`string`, `unknown`\>
|
|
4337
|
+
|
|
4338
|
+
##### Parameters
|
|
4339
|
+
|
|
4340
|
+
###### path
|
|
4341
|
+
|
|
4342
|
+
`string` | `URL`
|
|
4343
|
+
|
|
4344
|
+
###### reviver?
|
|
4345
|
+
|
|
4346
|
+
`YamlReviver`
|
|
4347
|
+
|
|
4348
|
+
###### options?
|
|
4349
|
+
|
|
4350
|
+
`ReadYamlOptions`\<`"brotli"` \| `"gzip"` \| `"none"`\>
|
|
4351
|
+
|
|
4352
|
+
##### Returns
|
|
4353
|
+
|
|
4354
|
+
`R`
|
|
4355
|
+
|
|
4356
|
+
***
|
|
4357
|
+
|
|
4358
|
+
### writeYaml()
|
|
4359
|
+
|
|
4360
|
+
#### Call Signature
|
|
4361
|
+
|
|
4362
|
+
```ts
|
|
4363
|
+
function writeYaml(
|
|
4364
|
+
path,
|
|
4365
|
+
data,
|
|
4366
|
+
options?): Promise<void>
|
|
4367
|
+
```
|
|
4368
|
+
|
|
4369
|
+
Defined in: [packages/fs/src/write/write-yaml.ts:10](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/write/write-yaml.ts#L10)
|
|
4370
|
+
|
|
4371
|
+
##### Parameters
|
|
4372
|
+
|
|
4373
|
+
###### path
|
|
4374
|
+
|
|
4375
|
+
`string` | `URL`
|
|
4376
|
+
|
|
4377
|
+
###### data
|
|
4378
|
+
|
|
4379
|
+
`any`
|
|
4380
|
+
|
|
4381
|
+
###### options?
|
|
4382
|
+
|
|
4383
|
+
`Options`
|
|
4384
|
+
|
|
4385
|
+
##### Returns
|
|
4386
|
+
|
|
4387
|
+
`Promise`\<`void`\>
|
|
4388
|
+
|
|
4389
|
+
#### Call Signature
|
|
4390
|
+
|
|
4391
|
+
```ts
|
|
4392
|
+
function writeYaml(
|
|
4393
|
+
path,
|
|
4394
|
+
data,
|
|
4395
|
+
replacer?,
|
|
4396
|
+
options?): Promise<void>
|
|
4397
|
+
```
|
|
4398
|
+
|
|
4399
|
+
Defined in: [packages/fs/src/write/write-yaml.ts:16](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/write/write-yaml.ts#L16)
|
|
4400
|
+
|
|
4401
|
+
##### Parameters
|
|
4402
|
+
|
|
4403
|
+
###### path
|
|
4404
|
+
|
|
4405
|
+
`string` | `URL`
|
|
4406
|
+
|
|
4407
|
+
###### data
|
|
4408
|
+
|
|
4409
|
+
`any`
|
|
4410
|
+
|
|
4411
|
+
###### replacer?
|
|
4412
|
+
|
|
4413
|
+
[`JsonReplacer`](index.md#jsonreplacer)
|
|
4414
|
+
|
|
4415
|
+
###### options?
|
|
4416
|
+
|
|
4417
|
+
`string` | `number` | `Options`
|
|
4418
|
+
|
|
4419
|
+
##### Returns
|
|
4420
|
+
|
|
4421
|
+
`Promise`\<`void`\>
|
|
4422
|
+
|
|
4423
|
+
***
|
|
4424
|
+
|
|
4425
|
+
### writeYamlSync()
|
|
4426
|
+
|
|
4427
|
+
#### Call Signature
|
|
4428
|
+
|
|
4429
|
+
```ts
|
|
4430
|
+
function writeYamlSync(
|
|
4431
|
+
path,
|
|
4432
|
+
data,
|
|
4433
|
+
options?): void
|
|
4434
|
+
```
|
|
4435
|
+
|
|
4436
|
+
Defined in: [packages/fs/src/write/write-yaml-sync.ts:10](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/write/write-yaml-sync.ts#L10)
|
|
4437
|
+
|
|
4438
|
+
##### Parameters
|
|
4439
|
+
|
|
4440
|
+
###### path
|
|
4441
|
+
|
|
4442
|
+
`string` | `URL`
|
|
4443
|
+
|
|
4444
|
+
###### data
|
|
4445
|
+
|
|
4446
|
+
`any`
|
|
4447
|
+
|
|
4448
|
+
###### options?
|
|
4449
|
+
|
|
4450
|
+
`Options`
|
|
4451
|
+
|
|
4452
|
+
##### Returns
|
|
4453
|
+
|
|
4454
|
+
`void`
|
|
4455
|
+
|
|
4456
|
+
#### Call Signature
|
|
4457
|
+
|
|
4458
|
+
```ts
|
|
4459
|
+
function writeYamlSync(
|
|
4460
|
+
path,
|
|
4461
|
+
data,
|
|
4462
|
+
replacer?,
|
|
4463
|
+
options?): void
|
|
4464
|
+
```
|
|
4465
|
+
|
|
4466
|
+
Defined in: [packages/fs/src/write/write-yaml-sync.ts:16](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/write/write-yaml-sync.ts#L16)
|
|
4467
|
+
|
|
4468
|
+
##### Parameters
|
|
4469
|
+
|
|
4470
|
+
###### path
|
|
4471
|
+
|
|
4472
|
+
`string` | `URL`
|
|
4473
|
+
|
|
4474
|
+
###### data
|
|
4475
|
+
|
|
4476
|
+
`any`
|
|
4477
|
+
|
|
4478
|
+
###### replacer?
|
|
4479
|
+
|
|
4480
|
+
[`JsonReplacer`](index.md#jsonreplacer)
|
|
4481
|
+
|
|
4482
|
+
###### options?
|
|
4483
|
+
|
|
4484
|
+
`string` | `number` | `Options`
|
|
4485
|
+
|
|
4486
|
+
##### Returns
|
|
4487
|
+
|
|
4488
|
+
`void`
|
|
4489
|
+
|
|
4490
|
+
## Type Aliases
|
|
4491
|
+
|
|
4492
|
+
### YamlReplacer
|
|
4493
|
+
|
|
4494
|
+
```ts
|
|
4495
|
+
type YamlReplacer = JsonReplacer;
|
|
4496
|
+
```
|
|
4497
|
+
|
|
4498
|
+
Defined in: [packages/fs/src/types.ts:144](https://github.com/visulima/visulima/blob/4ae292984681c71a770e4d4560432f7b7c5a141a/packages/fs/src/types.ts#L144)
|
|
4482
4499
|
|
|
4483
4500
|
<!-- /TYPEDOC -->
|
|
4484
4501
|
|
|
@@ -4512,7 +4529,7 @@ If you would like to help take a look at the [list of issues](https://github.com
|
|
|
4512
4529
|
The visulima fs is open-sourced software licensed under the [MIT][license-url]
|
|
4513
4530
|
|
|
4514
4531
|
[typescript-image]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript
|
|
4515
|
-
[typescript-url]: "typescript"
|
|
4532
|
+
[typescript-url]: https://www.typescriptlang.org/ "TypeScript" "typescript"
|
|
4516
4533
|
[license-image]: https://img.shields.io/npm/l/@visulima/fs?color=blueviolet&style=for-the-badge
|
|
4517
4534
|
[license-url]: LICENSE.md "license"
|
|
4518
4535
|
[npm-image]: https://img.shields.io/npm/v/@visulima/fs/latest.svg?style=for-the-badge&logo=npm
|