tractordev / wanix

Experimental, local-first, web-native, Unix-like development environment
https://wanix.sh
MIT License
238 stars 13 forks source link

indexedfs: implement `Rename` for directories #113

Open Parzival-3141 opened 9 months ago

Parzival-3141 commented 9 months ago

https://github.com/tractordev/wanix/blob/2868431b7502be5c8c2b9b3594be0d698b950635/internal/indexedfs/indexedfs.go#L291 With current behavior, renaming a directory only moves the root directory file and not it's children.

progrium commented 8 months ago

We might want to change the schema from just a path to a name and a parent ID. This would make move/rename operations not need to change children. The tradeoff would be path lookups would be slower, but we can always cache them in memory. As long as we are careful to expire all the child paths on a move...