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

use ... to specify path in i_am()? #67

Open
ijlyttle opened this issue Dec 18, 2020 · 3 comments
Open

use ... to specify path in i_am()? #67

ijlyttle opened this issue Dec 18, 2020 · 3 comments

Comments

@ijlyttle
Copy link

ijlyttle commented Dec 18, 2020

This may be a picky point, but the only way to use i_am() with a compound path is to provide the file separator. I understand that one of the goals of {here} is to abstract the file separator away from the user.

Could the ... argument in i_am() be implemented the same way as it is for here()?

I see from the i_am() documentation that ... is reserved for future use, could this be it?

Thanks!

@moutikabdessabour
Copy link

moutikabdessabour commented Dec 25, 2020

actually this will be easily solved by adding path <- do.call(file.path, as.list(path)) after the empty dots check in i_am code. Also changing the description to show that path accepts a character vector of any size.
Edit : path <- paste0(path, collapse=.Platform$file.sep) will work too :)

moutikabdessabour added a commit to moutikabdessabour/here that referenced this issue Dec 25, 2020
@krlmlr
Copy link
Member

krlmlr commented Apr 2, 2021

Thanks for raising this. I think these days / works as a file separator everywhere? What's the motivation behind splitting the path?

@ijlyttle
Copy link
Author

I think the only motivation was to keep parity with here() - if you are used to ... working there, you might expect for it to work with i_am(). Otherwise, I agree that / has become standard.

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

3 participants