4 ms·
According to [1], Mac supports using slashes as part of folder names (they use colons instead). So there might be some circumstances where that decision comes b
by Qwertious 3y ago
According to [1], Mac supports using slashes as part of folder names (they use colons instead). So there might be some circumstances where that decision comes back to bite you, if you ever port to Mac.
[1]https://discussions.apple.com/thread/677339?sortBy=best https://discussions.apple.com/thread/677339?sortBy=best
- iforgotpassword 3y agoHeh, memory is foggy but I think one colleague occasionally ran it on his Mac without issues. I guess your linked thread is good advice, just dont't do it – like using spaces in filenames sooner or later makes a random shell script go haywire.
- elmimmo 3y agoThey used colon instead, back in pre OS X days. That’s >20 years ago. Admittedly some obscure cases carried that over and remain but you’ll rarely come across them today.
- kragen 3y agoyes, if by 'mac' you mean macos 9 or earlier, which was a consideration when java was designed but generally not anymore
- javawizard 3y agoOh it's even weirder than that: whether or not paths are separated by colons or slashes is specific to the app you're using, even in modern macOS versions. To see this in action, open a terminal, type: touch test:file.txt Then open Finder and browse to whatever folder you were in and you'll see a file called test/file.txt. I'm not sure which is the native representation, but I do know that every API I've used to interact with the filesystem on macOS has used slashes as the path separator, so GP should be fine. But it's definitely a fun party trick to pull out around unsuspecting Mac users.