Closed robin-nitrokey closed 9 months ago
Would we not want to make it possible to rename across filesystems ?
It's a bit more involved but it's already implemented in trussed-staging as an internal need of the staging backend: https://github.com/Nitrokey/trussed-staging/blob/c6aa6bdd65f04eb746a2d65725ba2d01c27ae1f7/src/streaming/store.rs#L99
To me it makes sense to have rename
as a cheap and atomic operation that is only possible on the same filesystem. Adding the method you linked would be nice, but I’d rather call it copy
to reflect the actual cost.
This patch adds a rename syscall to the FilesystemClient that allows applications to move a file within the same storage location and within the client namespace.