-1

Say I have a file structure like so

a
|
+-- x
|
+-- y
b

and I wish to move x from a to b, what would be the best way of achieving this in Rust? I am working on Windows, but would optimally like to add cross platform support.

I am not particularly experienced with Rust at the moment, and haven't been able to find an answer on the web.

EDIT The cross platform support is unimportant at the moment :)

Chayim Friedman
  • 47,971
  • 5
  • 48
  • 77
Myexgiko
  • 423
  • 1
  • 4
  • 12

1 Answers1

1

Use std::fs::rename() to move a file.

Chayim Friedman
  • 47,971
  • 5
  • 48
  • 77