RangerMauve / hypercore-fetch

Implementation of Fetch that uses the Hyper SDK for loading p2p content
MIT License
37 stars 13 forks source link

Use `PATCH` to rename files/folders #87

Open josephmturner opened 1 year ago

josephmturner commented 1 year ago

The Github API uses PATCH requests for renaming repositories (SO post here.

WDYT about an API for to rename /foo to /bar like this:

PATCH hyper://PUBLIC-KEY/foo
Content-Type: application/json

{ "name": "/bar" }

This feature would make atomic renaming possible by using drive.batch() under the hood.

josephmturner commented 1 year ago

@alphapapa do you have any thoughts on this API?

alphapapa commented 1 year ago

I like it!