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

Improve Rename API #69

Closed
wants to merge 6 commits into from
Closed

Improve Rename API #69

wants to merge 6 commits into from

Conversation

clayellis
Copy link
Contributor

Resolves #67

@JohnSundell
Copy link
Owner

@clayellis Do you think this is still an issue with Files 4.0+?

@clayellis
Copy link
Contributor Author

@JohnSundell the surface area of the rename API didn't change between 3 and 4 — so I think the original motivations from #67 remain. However, I wasn't the one who brought up the issue, I just wrote the "fix", so I'm not super opinionated. Though, I do think this revision is a little more explicit and helps the user clarify their intent.

@maximkrouk
Copy link

maximkrouk commented Sep 25, 2022

#124 is kinda related in terms of what name and what extension is, I suppose that for the hidden files the current PR implementation may treat name as an empty string

Example
.swiftlint -> (change name to .swiftformat) -> .swiftformat.swiftlint
.swiftlint -> (change extension to yml) -> .yml
Instead of
.swiftlint -> (change name to .swiftformat) -> .swiftformat
.swiftlint -> (change extension to yml) -> -> .swiftlint.yml

Btw I think that getting the name and the extension should probably work like this 🤔
.swiftlint -> (name, extension) -> (".swiftlint", "")
.swiftlint.yml -> (name, extension) -> (".swiftlint", "yml")
Maybe even (but the previous one is frankly better)
.swiftlint -> (name, extension) -> (".swiftlint", "swiftlint")
.swiftlint.yml -> (name, extension) -> (".swiftlint", "yml")

@clayellis
Copy link
Contributor Author

Closing, since it's been a few years without activity.

@clayellis clayellis closed this Dec 4, 2022
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.

Rename Item API
3 participants