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 for path("http://", ...) #439

Closed
dlksmc opened this issue Dec 17, 2023 · 1 comment
Closed

Support for path("http://", ...) #439

dlksmc opened this issue Dec 17, 2023 · 1 comment

Comments

@dlksmc
Copy link

dlksmc commented Dec 17, 2023

Description

fs is a wonderful package--I use it in almost every script I write! Thank you to everyone who contributes to it!

Is it a bug that path doesn't seem to work with http://, or is that by design?

Steps to Reproduce

fs::path("https://github.com/r-lib/fs", "issues") returns 'https:/github.com/r-lib/fs/issues', stripping off the second slash.

Expected Behavior

I expected a return value of 'https://github.com/r-lib/fs/issues', similar to the output of file.path("https://github.com/r-lib/fs", "issues") from base R.

@gaborcsardi
Copy link
Member

It is by design, supporting URLs would complicate this function considerably, I think for URL you can use paste() or some URL specific function from another package. Changing this would also be a breaking change, so even if we wanted to support URLs, we cannot do it at this point.

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

No branches or pull requests

2 participants