Skip to content
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

Merged
merged 7 commits into from
Jun 21, 2022

Conversation

hulto
Copy link
Collaborator

@hulto hulto commented Mar 18, 2022

What type of PR is this?

What this PR does / why we need it:

Implments eldritch feature.

Which issue(s) this PR fixes:

Fixes #

@hulto hulto requested a review from Milkshak3s April 1, 2022 23:20
Copy link
Collaborator

@Milkshak3s Milkshak3s left a 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
Copy link
Collaborator

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.
Copy link
Collaborator

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

@hulto hulto merged commit 4a3ba57 into main Jun 21, 2022
@hulto hulto deleted the hulto-eldritch-feature-file-mv branch June 21, 2022 23:49
KCarretto pushed a commit that referenced this pull request Feb 1, 2024
 
File.Moveto method implemented, tested, and doc'd (#25)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants