Specifying absolute path in R using `file.path()`? Do I have to use `.Platform$file.sep`?

Viewed 19

Is there a better wy to specify an absolute path using file.path() than using .Platform$file.sep as followed?

I have to access a fiel on a mounted volume which is (on a Mac) on /Volumes/....

I know, on other systems these are somewhere else, but I am interested in using file.path() for this.

  file.path(
    .Platform$file.sep,
    "Volumes", 
    "LEEF", 
    "LEEF.archived.data", 
    "LEEF/3.archived.data", 
    "extracted", 
    "LEEF.bemovi.mag.25.bemovi.20220216/"
  )
0 Answers
Related