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

Support cp(::AbstractPath, ::AbstractString) and vice-versa? #122

Open
ericphanson opened this issue Jul 22, 2021 · 1 comment
Open

Support cp(::AbstractPath, ::AbstractString) and vice-versa? #122

ericphanson opened this issue Jul 22, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@ericphanson
Copy link
Contributor

This comes up when users try things like cp("~/my_file", S3Path("...")). Since often users first encouter the filepaths system via special paths like S3Paths, they don't realize they need to fully "opt-in" to the ecosystem by wrapping the first argument in Path. (In other words: folks probably have not even done using FilePathsBase and might not realize there is a parallel path system). I think adding methods that wrap AbstractString arguments in Path would help ease interoperability.

@rofinn rofinn added the enhancement New feature or request label Nov 16, 2021
@rofinn
Copy link
Owner

rofinn commented Nov 16, 2021

Yeah, I'll take another look that this. There is the FilePaths.@compat macro, but depending on the use case it can often introduces ambiguities. I'm a little nervous about introducing automatic conversion for some methods if it'll introduce ambiguities on others. Seems like that kind of inconsistency is worse than doing nothing at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants