Commit 90071cb
committed
fs: Provide _remove_dir_contents
This splits remove_dir_all into two: one part is the thin wrapper for
_delete_dir_contents, and the other part is responsible for deleting
the top-level directory.
We are going to expose a function for only deleting the contents, and
this will be its primary building block.
I provided two entrypoints, one of which wraps the other, rather than
a boolean and a conditional, because IMO it mekes the code clearer.
(It would also have been possible to duplicate the canonicalize call,
but I felt that was worse.)
There is no functional change yet.
Signed-off-by: Ian Jackson <[email protected]>1 parent 0b8a207 commit 90071cb
1 file changed
+9
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
| 63 | + | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
79 | 86 | | |
80 | 87 | | |
81 | 88 | | |
| |||
0 commit comments