here icon indicating copy to clipboard operation
here copied to clipboard

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

Open ijlyttle opened this issue 3 years ago • 3 comments

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!

ijlyttle avatar Dec 18 '20 23:12 ijlyttle

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 avatar Dec 25 '20 01:12 moutikabdessabour

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

krlmlr avatar Apr 02 '21 04:04 krlmlr

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.

ijlyttle avatar Apr 11 '21 15:04 ijlyttle