3 ms·
> Early file systems did not have capabilities this advanced, and through decades of backward compatibility we're kind of stuck with Some did. Some mainframes
by hnlmorg 3y ago
> Early file systems did not have capabilities this advanced, and through decades of backward compatibility we're kind of stuck with
Some did. Some mainframes did. And Apple pre-OSX (HFS I think was the file system) did too.
The problem isn’t just backwards compatibility with DOS. It’s that most file transfer protocols don’t forward that kind of meta information. They don’t even share whether it’s executable, a system file or hidden (those that do have an attribute for hidden files). So the file type ended up needing to be encoded in the file name if just to preserve it.
- rollcat 3y agoFTP (and friends) indeed are a factor as well, but what stuck in my mind was how Forth initially was supposed to be named "Fourth", but the OS didn't support file names this long. https://en.wikipedia.org/wiki/Forth_(programming_language)#History https://en.wikipedia.org/wiki/Forth_(programming_language)#H... HFS (and HFS+, and APFS) indeed has "resource forks", and supporting (or just not tripping over) them on non-Apple filesystems comes with a bag of surprises, even on Apple platforms. Just last week we've run into a problem with a script that globbed for "*.mp4" files to feed them into ffmpeg, but ran into and choked on the "._*.mp4"'s (which is how macOS stores the resource forks on FAT32/exFAT). The script was tested and worked fine on every Mac I tested it on, and everything was smooth until the customer plugged in an external HD to process videos off of. https://en.wikipedia.org/wiki/Resource_fork https://en.wikipedia.org/wiki/Resource_fork So unfortunately the most reliable way of knowing exactly what you're working with, is lots of heuristics, and very defensive coding.
- hnlmorg 3y agoI didn’t mean FTP specifically, just file transfer protocols in general. But I do agree that FTP, specifically, is a garbage protocol.
- wolfgang42 3y agoResource forks are something different; the parent is referring to type and creator codes, which are part of the metadata for a file. (Type codes were also used to identify types inside the resource fork, which is maybe what you’re thinking of?) The type code didn’t carry encoding information, though I believe the later https://en.wikipedia.org/wiki/Uniform_Type_Identifier https://en.wikipedia.org/wiki/Uniform_Type_Identifier can.