How to get directory seperator?

How do I get the current OS directory separator? I guess it would usually be / but maybe : on mac and \ on windows not sure.

I wrote a settings module that accepts the name of a config file. Say I pass in somedir/foo.cfg. After I open the file and am reading the setting it may include another file. Id like that to be relative to somedir. I use Parent.NativePath to get somedir. I tried it on macos x and linix. On one of the systems it returns a trailing / on the other not. So I need to know the directory separator to know what to check for or add to the end before appending the new include.

several ways
the easiest is probably to just set up a constant, PathSep, with 3 values
one for macOS, one for Windows, and one for Linux
it does NOT need to be dynamic - the right value is chosen at compile time this way depending on what target you’re building for
like this

Can’t you just use Parent.Child() to get to the file relative to somedir?

I suppose that’s possible, yes.