Simplifying, but Apple offered APIs using two path kinds: HFS uses colon as a path separator, POSIX uses slash. 25 years later, the HFS APIs are mostly dead. We just use POSIX.

I just wrote a file with a colon in the name and sent it to the iOS share sheet… which shows a slash.

I was going to convert both to hyphen/minus (the low ASCII one) out of paranoia anyway, plus 2026:03:25 is weird. I just wanted to see what would happen: I write POSIX, it shows HFS. Avoid both! #AppleDevelopment

It's wild things turned out this way. Honestly, both slash and colon are useful: slash for dates, colons for times. Arguably, using either as a special character is one of the biggest instances of technical debt in computing, yet we never think of it that way.

I'm between YYYYY-MM-DD HH-MM-SS and YYYY-MM-DD HHMMSS now.

But wait, are you a Unix expat using a Mac and reading all this and saying "no, slash is never valid"?

Go ahead, try it in Finder. Dare you.

(Hint: It's safe.)

My guess is that at some point Apple decided "slashes are more useful than colons in filenames," and they're probably right. People manually date (only) files more often than they manually time (only) them. So they made sure all the user-facing API reflected that.

I mean if you can get big/little endian right, file separators are probably comically easy.

@tewha so between a rock and a hard place. Got it.