holepunchto / hyperdrive

Hyperdrive is a secure, real time distributed file system
Apache License 2.0
1.86k stars 135 forks source link

feat: .clear a file from local cache #292

Closed okdistribute closed 4 years ago

okdistribute commented 4 years ago

Fixes https://github.com/hypercore-protocol/hyperdrive/issues/228#issuecomment-668678754

This calls clear under the hood for the given file, using the same walking tree as the hyperdrive.download function.

If this is a desired appraoch, I will also write a companion section for the README and tests for directories/mounts

andrewosh commented 4 years ago

Extracting that _walk function looks like a nice approach! LGTM

Would definitely appreciate those README additions, but I'll go ahead and rebase/release so you can use this now. Thanks for PRing this.

andrewosh commented 4 years ago

Published 10.17.0