-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File.Moveto method implemented, tested, and doc'd #25
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
@@ -59,10 +59,10 @@ The <b>file.read</b> method will read the contents of a file. If the file or dir | |||
|
|||
The <b>file.remove</b> method will delete a file or directory (and it's contents) specified by path. | |||
|
|||
### file.rename | |||
`file.rename(src: str, dst: str) -> None` | |||
### file.moveto |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧠
use std::path::Path; | ||
|
||
pub fn moveto(old: String, new: String) -> Result<()> { | ||
// If path is a dir delete it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels terrifying, but I respect the unified behavior
What type of PR is this?
What this PR does / why we need it:
Implments eldritch feature.
Which issue(s) this PR fixes:
Fixes #