HFS+, long file names, MacOSX, MacOS 9

ahunter3

macrumors 6502
Original poster
Oct 15, 2003
375
4
How are long file names implemented on HFS+/OSX?

Is it a kludge of sorts, as I understand long file names under Windows95 were? (where some database somewhere kept track of the long ones while under the hood the filenames actually seen by the OS were LONGFI~1.EXT or LONGFI~2.EXT or something like that? and you could "lose" the long filenames?)

I assume that WHERE the long file names are implemented has to be in the filing system, HFS+, on the storage medium itself. That doesn't directly address whether or not it is a kludge though, I guess.

At any rate, if the storage medium itself has the textstring that constitutes the long file name — whether in the old location used by older operating systems that use HFS+ or in a new field with the old field holding a truncated version — why would there not be a simple system extension for those older operating systems that would enable them to display the long file names?

Do files copied from one volume to another under MacOS 8 or 9 (which display an abbreviated filename) retain their long file names if you mount the destination volume in OS X later, or do the older operating systems, ignorant of the filename string contents beyond 32 characters, simply dub the newly-copied file with only as much of the filename as they can natively perceive?

I can see where an OS9ish extension that would properly inform all applications about long file names would be complicated and would break lots of apps, but if you were only interested in getting the Finder to play along it doesn't seem like such a formidable task. And yet I'm unaware of any such system extension.

Obviously I would not expect to see one now (not much call for OS 9 stuff these days), so this is more out of curiosity than compelling need (though I would have a use for it to be sure).
 

yellow

Moderator emeritus
Oct 21, 2003
16,033
1
Portland, OR
ahunter3 said:
How are long file names implemented on HFS+/OSX?
255 characters.

http://docs.info.apple.com/article.html?artnum=106843

And this is a function of HFS+, as 31 characters was a limit of HFS.

And in Windows, the limitation you noted was FAT16 (I think). FAT32 and NTFS have much longer file name abilities.

And to answer your last question:

If a file with a long name is viewed while started up from Mac OS 9, some of the file name's first twenty five characters are displayed along with a unique hexadecimal reference number. To view the full file name, start up from Mac OS X.
It should also be noted that Carbon apps (for example, Lotus Notes and Office X) will rely upon outdated 31 character limits. Not sure if all carbon apps display this property of just these 2.
 

Sun Baked

macrumors G5
May 19, 2002
14,874
57
Even though HFS+ brought long file name ability back in the OS 8.x days -- basically nobody updated their apps to use them.

OS 9 should not truncate the file names, as long as you don't perform any file modifications and save functions on those files with the old unaware apps.

You should be able to use the drive and look around under OS 9 without causing any problem, something you can do on the older OS 9 bootable machines.

The only HFS+ volume you will have problems with, is if you format using the newest GPT/HFS+ volume used by the Intel Macs instead of the old APM/HFS+ volume -- because the old OS 9 Macs don't understand the GPT/HFS+ volume.

Edit: GPT is just the Microsoft partition scheme used by the Intel Macs, versus the APM apple partion map on the old PPC Macs.
 

Catfish_Man

macrumors 68030
Sep 13, 2001
2,579
1
Portland, OR
yellow said:
It should also be noted that Carbon apps (for example, Lotus Notes and Office X) will rely upon outdated 31 character limits. Not sure if all carbon apps display this property of just these 2.
Modern carbon apps can avoid that. Silly Office :p
 

yellow

Moderator emeritus
Oct 21, 2003
16,033
1
Portland, OR
Catfish_Man said:
Modern carbon apps can avoid that. Silly Office :p
I agree, in theory. I don't know a lot about what it takes to carbonize an app. I figure in most cases it's a software limitation that carbonizing can't/won't touch.

At least in Lotus Notes' case, it's a SUPER legacy app that they carbonized. They ACTUALLY have a soft-limitation in the Mac version that limits a database to under 2GB in size. I theorize because when it was originally written, that was the max file size in HFS. I may be wrong, but I think that's the reason. Lotus Notes. :rolleyes:
 

Sun Baked

macrumors G5
May 19, 2002
14,874
57
This may help long file names under OS 9 ...

If you alter the file name -- ruins long file name

If you Duplicate file Command-D -- ruins long file name

Drag and Drop Copy -- retains file name