3 ms·
":" is or is not a legal character in filenames on macOS depending on which API you use! Try saving a file or renaming a file to contain ":" using the GUI. It
by klodolph 9y ago
":" is or is not a legal character in filenames on macOS depending on which API you use!
Try saving a file or renaming a file to contain ":" using the GUI. It will not work. However, "/" is fine.
Try saving a file or renaming a file to contain "/" using the CLI. It will not work. However, ":" is fine.
A ":" in the CLI is translated to "/" in the GUI and vice versa. ":" was the directory separator in Mac OS 9 and earlier, which explains the behavior. The actual on-disk filenames will contain "/", which is translated to ":" for the POSIX API. This is for HFS and HFS+, not sure how APFS changes things.