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

spec: implement rm_file() for single file deletion #499

Merged
merged 2 commits into from
Jul 13, 2021

Conversation

isidentical
Copy link
Member

No description provided.

@martindurant
Copy link
Member

This is going in, thanks!

I wonder, when do you find it necessary to call rm_file rather than rm (which would call _bulk delete with one path) ?

@martindurant martindurant merged commit 314e986 into fsspec:main Jul 13, 2021
@isidentical
Copy link
Member Author

I wonder, when do you find it necessary to call rm_file rather than rm (which would call _bulk delete with one path) ?

DVC always uses rm_file whether deleting a single file or multiple files, and for some remotes it is more optimized than rm() since it is doing a single job and not trying to expand path / check whether it is a directory etc. And s3fs was the only one which didn't support rm_file among the stuff we migrated so far so needed that. But yes, bulk deleting is a potential optimization target for me to use when we do dvc gc, but later ofc

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 this pull request may close these issues.

None yet

2 participants