The built-in file system libraries for many languages are total footguns. Using strings as paths is a great example. I’ve had a few recent bugs around case sensitive vs case insensitive file systems because a lot of code assumes that when pathA != pathB then it must be dealing with two different resources. Not to mention the classic “doesn’t work on windows” problem: newPath = pathA + “/“ + pathB
That's why it's good to have a cross-platform path datatype/literal baked into the language.
For eg. in Rebol/Red - http://www.rebol.com/r3/docs/datatypes/file.html