Canadian Mac Forums at ehMac banner
1 - 5 of 5 Posts

·
Registered
Joined
·
107 Posts
Discussion Starter · #1 ·
Any one notice when you save a file (say word document) on USB storage and read the USB disk on windows XP, there are additional files with a naming convention ".filename"

Anyone know why Apple creates these files what the extra files are for?

 

·
Premium Member
Joined
·
6,795 Posts
The Coles note version is that Mac OS creates files with two "forks", the data fork and the resource fork. The data fork contains all the files data and the resource fork contains any and all meta data.

Since Windows doesn't use the resource data, when a file is copied to a windows format disk (such as your USB drive) Mac OS X splits the resource data into a separate file. So if you copy "picture.jpg" to a windows disk you end up with both that file and also ".picture.jpg", the leading period makes the file invisible in OS X (and other flavours of *NIX as well). When you copy "picture.jpg" back to a Mac formatted disk the two files are recombined.

Why does it split the data into a separate file? I can't remember exactly, but probably something to do with the way windows might (mis)interpret the information.
 

·
Registered
Joined
·
107 Posts
Discussion Starter · #3 ·
Thanks poster boy.. that was quite informative...

So if I delete teh ".filename" file, windows can still read the file.. Now if I were to put that in mac, will MAC not be able to read the file without the ".filename" file?
 

·
Premium Member
Joined
·
6,795 Posts
If you delete the ".picture.jpg" file, a Mac will still be able to use the file, after all all of the data is contained in the data fork. What you will lose is the creator type codes, modification dates, any labels you may have assigned, etc.

For example, if you create a the file "picture.jpg" with Photoshop and then copy it to a PC, delete the .picture.jpg file and copy it back, the file will show up as a generic jpeg file instead of a photoshop jpeg.

Not a big deal in Mac OS X (at this point) because it relies more on filename extensions than anything else when it decides how to deal with files, but Mac OS 9 did most of its' work with meta data and lots of people, myself included, view it as a much better way to deal with files (because it stores a lot of information, it makes for a much richer experience).
 

·
Premium Member
Joined
·
5,247 Posts
Filenames preceded by a period, eg:
.whatever
... are hidden (invisible) in MacOSX. They are visible in OS9 and in Windows.

Earlier Mac files have a data fork and a resource fork. The data fork is the file itself, while the resource fork is information about the file; which program created it, what kind of file it is, etc. The resource fork is always invisible in Classic Mac OS's, but visible in other OS's like Windows or UNIX. It's "supposed" to be visible in OSX as well, but for compatibility reasons OSX hides them from us.

Under OS9 file extensions weren't used, and the resource fork is why they weren't necessary. Windows users sometimes click on the resource fork and find it's empty or doesn't open, and this confuses them. The data fork itself opens fine and is the "real" file as far as non-Mac systems are concerned.

Losing the resource fork can cause problems in OS9; the "generic icon" is one. If a PhotoShop TIFF file is, for example, saved with layers another program that can open TIFFs may not be able to deal with the layers.

Unlike Classic Mac OS's, Windows and UNIX don't associate the two forks as being "joined" and sometimes send just the data fork when transferring files. The solution is to use a Mac compression utility which will insure they stay together while stored or traveling on a non-Mac system.

If the resource fork is missing, Mac users will see a dialog that the file can't be opened even thought it was created on the same computer; it's because the computer guessed at the wrong program to try to open it, or an incompatible program was set to open unknown TIFFs. If the resource fork is included, the Mac will simply launch PhotoShop and the problem isn't apparent. This can be annoying but usually can be fixed by opening the file from within PhotoShop's "File: Open" dialog instead of double-clicking in the finder. This assumes you know it's a PS file; if you don't know then it might take a bit of playing around to figure out how to open it.

OSX doesn't use resource forks, so now we have file extensions just like Windows. OSX will, however preserve the resource fork, as it is designed to be compatible with OS9.

.DesktopDB
.DesktopDF
.DSstore
are some files that will show up on Windows systems from OSX volumes or computers. They can be ignored or deleted; they are used to remember such things as window position and size, icon locations, etc on a Mac computer.

You can use Toast or freeware DSstoreCleaner to remove them from your removable media so Windows XP users don't see them and get confused by them.

[ February 25, 2004, 04:43 PM: Message edited by: gordguide ]
 
1 - 5 of 5 Posts
Top