Commit ed2293e
fs: add recursive option to rmdir()
This commit adds a recursive option to fs.rmdir(),
fs.rmdirSync(), and fs.promises.rmdir(). The implementation
is a port of the npm module rimraf.
PR-URL: #29168
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Ben Coe <bencoe@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>1 parent 6a4f156 commit ed2293eCopy full SHA for ed2293e
File tree
Expand file treeCollapse file tree
9 files changed
+550
-11
lines changedOpen diff view settings
Filter options
- doc/api
- lib
- internal/fs
- test/parallel
- tools
Expand file treeCollapse file tree
9 files changed
+550
-11
lines changedOpen diff view settings
Collapse file
+19Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1507 | 1507 | |
1508 | 1508 | |
1509 | 1509 | |
| 1510 | + |
| 1511 | + |
| 1512 | + |
| 1513 | + |
| 1514 | + |
| 1515 | + |
| 1516 | + |
| 1517 | + |
| 1518 | + |
| 1519 | + |
| 1520 | + |
| 1521 | + |
| 1522 | + |
| 1523 | + |
| 1524 | + |
| 1525 | + |
| 1526 | + |
| 1527 | + |
| 1528 | + |
Collapse file
+51-4Lines changed: 51 additions & 4 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
3017 | 3017 | |
3018 | 3018 | |
3019 | 3019 | |
3020 | | - |
| 3020 | + |
3021 | 3021 | |
3022 | 3022 | |
3023 | 3023 | |
| 3024 | + |
| 3025 | + |
| 3026 | + |
| 3027 | + |
3024 | 3028 | |
3025 | 3029 | |
3026 | 3030 | |
| ||
3035 | 3039 | |
3036 | 3040 | |
3037 | 3041 | |
| 3042 | + |
| 3043 | + |
3038 | 3044 | |
| 3045 | + |
| 3046 | + |
| 3047 | + |
| 3048 | + |
| 3049 | + |
| 3050 | + |
| 3051 | + |
| 3052 | + |
| 3053 | + |
| 3054 | + |
| 3055 | + |
| 3056 | + |
3039 | 3057 | |
3040 | 3058 | |
3041 | 3059 | |
| ||
3045 | 3063 | |
3046 | 3064 | |
3047 | 3065 | |
3048 | | - |
| 3066 | + |
3049 | 3067 | |
3050 | 3068 | |
3051 | 3069 | |
| 3070 | + |
| 3071 | + |
| 3072 | + |
| 3073 | + |
3052 | 3074 | |
3053 | 3075 | |
3054 | 3076 | |
3055 | 3077 | |
3056 | 3078 | |
3057 | 3079 | |
| 3080 | + |
| 3081 | + |
3058 | 3082 | |
| 3083 | + |
| 3084 | + |
| 3085 | + |
| 3086 | + |
3059 | 3087 | |
3060 | 3088 | |
3061 | 3089 | |
| ||
4694 | 4722 | |
4695 | 4723 | |
4696 | 4724 | |
4697 | | - |
| 4725 | + |
4698 | 4726 | |
4699 | 4727 | |
| 4728 | + |
| 4729 | + |
| 4730 | + |
| 4731 | + |
| 4732 | + |
4700 | 4733 | |
4701 | 4734 | |
| 4735 | + |
| 4736 | + |
4702 | 4737 | |
| 4738 | + |
| 4739 | + |
| 4740 | + |
| 4741 | + |
| 4742 | + |
| 4743 | + |
| 4744 | + |
| 4745 | + |
| 4746 | + |
| 4747 | + |
| 4748 | + |
| 4749 | + |
4703 | 4750 | |
4704 | 4751 | |
4705 | 4752 | |
| ||
5193 | 5240 | |
5194 | 5241 | |
5195 | 5242 | |
5196 | | - |
| 5243 | + |
5197 | 5244 | |
5198 | 5245 | |
5199 | 5246 | |
|
Collapse file
+32-4Lines changed: 32 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
76 | 76 | |
77 | 77 | |
78 | 78 | |
| 79 | + |
79 | 80 | |
80 | 81 | |
81 | 82 | |
| ||
100 | 101 | |
101 | 102 | |
102 | 103 | |
| 104 | + |
| 105 | + |
103 | 106 | |
104 | 107 | |
105 | 108 | |
| ||
720 | 723 | |
721 | 724 | |
722 | 725 | |
723 | | - |
| 726 | + |
| 727 | + |
| 728 | + |
| 729 | + |
| 730 | + |
| 731 | + |
| 732 | + |
| 733 | + |
| 734 | + |
| 735 | + |
| 736 | + |
| 737 | + |
724 | 738 | |
725 | | - |
| 739 | + |
| 740 | + |
| 741 | + |
| 742 | + |
| 743 | + |
| 744 | + |
| 745 | + |
| 746 | + |
726 | 747 | |
727 | 748 | |
728 | | - |
| 749 | + |
729 | 750 | |
730 | 751 | |
731 | | - |
| 752 | + |
732 | 753 | |
| 754 | + |
| 755 | + |
| 756 | + |
| 757 | + |
| 758 | + |
| 759 | + |
| 760 | + |
733 | 761 | |
734 | 762 | |
735 | 763 | |
|
Collapse file
lib/internal/fs/promises.js
Copy file name to clipboardExpand all lines: lib/internal/fs/promises.js+11-3Lines changed: 11 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
18 | 18 | |
19 | 19 | |
20 | 20 | |
| 21 | + |
21 | 22 | |
22 | 23 | |
23 | 24 | |
| ||
32 | 33 | |
33 | 34 | |
34 | 35 | |
| 36 | + |
35 | 37 | |
36 | 38 | |
37 | 39 | |
| ||
291 | 293 | |
292 | 294 | |
293 | 295 | |
294 | | - |
295 | | - |
296 | | - |
| 296 | + |
| 297 | + |
| 298 | + |
| 299 | + |
| 300 | + |
| 301 | + |
| 302 | + |
| 303 | + |
| 304 | + |
297 | 305 | |
298 | 306 | |
299 | 307 | |
|
0 commit comments