Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add path to ProgressData #154

Closed
marchuffnagle opened this issue Aug 30, 2023 · 0 comments · Fixed by #155
Closed

Add path to ProgressData #154

marchuffnagle opened this issue Aug 30, 2023 · 0 comments · Fixed by #155

Comments

@marchuffnagle
Copy link
Contributor

marchuffnagle commented Aug 30, 2023

The sindresorhus/del-cli repository has a ticket to add a --verbose flag (sindresorhus/del-cli#24). That flag would show the names of files as they're deleted. There's a comment in that issue saying that the progress event from this package should be used for that feature. It looks like the progress callback was added in #141.

The onProgress callback of deleteAsync currently returns totalCount, deletedCount, and percent. To support printing out filenames as they're deleted, we would need to add path to that as well. Similar to what is done in sindresorhus/cpy, this would be the absolute path of the file that was deleted.

Because we need to handle the case where files.length === 0, the path property would be optional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant