std/fs/move should handle moving across mounts/devices
Is your feature request related to a problem? Please describe.
currently you cannot use Deno.rename to move a file or directory across mounts/devices:
error: Uncaught (in promise) Error: Invalid cross-device link (os error 18) await Deno.rename(src, dest); ^ at deno:core/01_core.js:106:46 at unwrapOpResult (deno:core/01_core.js:126:13) at async Object.rename (deno:runtime/js/30_fs.js:172:5) at async move (https://deno.land/[email protected]/fs/move.ts:33:3)
this is not the case with the mv command: mv uses cp(1) and rm(1)
Describe the solution you'd like
make Deno.rename match mv.
Deno.rename maps onto a posix system call. We want to maintain the ability to make this low-level call.
I think we should have the functionality you describe but it belongs in std/fs/move.ts
I will transfer this issue back to deno_std and retitle it.
Are we okay with merging something that's not testable? I don't see how we could reasonably test moving accross mounts in CI.