Files icon indicating copy to clipboard operation
Files copied to clipboard

Improve Rename API

Open clayellis opened this issue 6 years ago • 2 comments

Resolves #67

clayellis avatar Jun 01 '18 18:06 clayellis

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

JohnSundell avatar Sep 27 '19 07:09 JohnSundell

@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.

clayellis avatar Sep 30 '19 15:09 clayellis

https://github.com/JohnSundell/Files/pull/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")

maximkrouk avatar Sep 25 '22 02:09 maximkrouk

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

clayellis avatar Dec 04 '22 00:12 clayellis