which one are you?
macOS/*BSD/#Linux/Unix: "/path/to/file"
Windows: "\path\To a Folder\file"
which one are you?
macOS/*BSD/#Linux/Unix: "/path/to/file"
Windows: "\path\To a Folder\file"
@nixCraft Inaccurate for macOS. The Mac APIs use colons as directory separators. Yes, Darwin uses slashes, but those get translated to/from colons at the Darwin/Mac API interfaces.
Attempt to use a colon in a filename in the Finder and you will fail, but slashes are fine.
@userid_required @reinhart @nixCraft They're there under the covers. Paths in the GUI have graphical elements between the components.
This was done, of course, for backwards compatibility with code written against pre-OS X versions of the Mac operating system.
Do a «touch foo:bar.txt», look at the file in Finder, and open it in TextEdit & look at the title bar.
@nixCraft "\" will always be an escape character
also "\" is awkward to type quickly
When you know far too much about Windows:
"\??\C:\Path\to A FoLdEr\nul"
@nixCraft
You're missing Mac which uses : as the path separator.
(Put a colon in a file name and then view it in finder.)