You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+27Lines changed: 27 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -108,6 +108,33 @@ Minimum: `1`
108
108
109
109
Concurrency limit.
110
110
111
+
##### onProgress
112
+
113
+
Type: `(progress: ProgressData) => void`
114
+
115
+
Called after each file or directory is deleted.
116
+
117
+
```js
118
+
importdelfrom'del';
119
+
120
+
awaitdel(patterns, {
121
+
onProgress:progress=> {
122
+
// …
123
+
}});
124
+
```
125
+
126
+
###### ProgressData
127
+
128
+
```js
129
+
{
130
+
totalFiles: number,
131
+
deletedFiles: number,
132
+
percent: number
133
+
}
134
+
```
135
+
136
+
-`percent` is a value between `0` and `1`
137
+
111
138
## CLI
112
139
113
140
See [del-cli](https://github.com/sindresorhus/del-cli) for a CLI for this module and [trash-cli](https://github.com/sindresorhus/trash-cli) for a safe version that is suitable for running by hand.
0 commit comments