How to accèss parent directory in OS agnostic way

In some package I do this:

const srcdir = dirname(@__FILE__)
const datadir = joinpath(srcdir, "../data/")

But I expect Windows will not like “…/”. What’s the right way to do this? I had trouble scrounging this from the docs.

joinpath(srcdir, "..", "data")

2 Likes

Of course. Thanks!