3 ms·
> I'm sure some people here remember that classic MacOS paths used colon as the separator In modern macOS (previously OS X), you’ll eventually bump into those
by latexr 4y ago
> I'm sure some people here remember that classic MacOS paths used colon as the separator
In modern macOS (previously OS X), you’ll eventually bump into those if you need to work with paths in AppleScript. You have to specify when you’re using a POSIX path so it is properly converted. Example:
$ osascript -e 'POSIX file "/System/Applications/Mail.app/Contents/MacOS/Mail"'
=> file Macintosh HD:System:Applications:Mail.app:Contents:MacOS:Mail
- lmz 4y agoDoesn't MacOS translate "/" into ":" sometimes in save dialog boxes when you type in a filename?
- latexr 4y agoGo in the Finder and try to change a file name to have a colon. macOS will tell you it can’t do it. Now change it to have a forward slash. macOS will happily abide. Finally, look at that file’s path in a terminal. Where the Finder shows a forward slash, the terminal will show a colon. Redoing the AppleScript example: $ osascript -e 'POSIX file "/tmp/file with : forward slash.txt"' => file Macintosh HD:private:tmp:file with / forward slash.txt