Specifications
When a Mac OS X user copies a file from a foreign volume to a Mac-specific volume, the system
looks for a matching “dot-underscore” file. If one exists, the system uses the information in the
dot-underscore file to recreate the resource fork and file type attributes. If the hidden file does
not exist, these attributes are not recreated.
Emulation using NTFS alternate data streams
Although this feature is not widely known, the NTFS file system (used by most modern Microsoft
Windows systems) supports alternate data streams in a file. In a way this feature is a generalization
of the Mac resource fork concept. Each individual stream can be opened for input or output, but
otherwise the file (with all its associated streams) is managed as a single unit. The Windows user
interface provides no interface to alternate data streams, and regular Windows applications
never use alternate data streams.
Several AppleTalk file sharing protocol (AFP) implementations for Windows servers, including
Microsoft's own implementation, emulate Mac file types and resource forks on the Windows NTFS
file system using alternate data streams. Note that these AFP implementations do not support
the FAT file system since it doesn't offer alternate data streams.
This mechanism has the benefit of storing the emulated information in one single file with the
regular data. However the presence of this extra data is extremely hard to detect for a Windows
user (i.e. only through specialized shareware utilities).
Furthermore, while the Windows file system correctly copies any alternate data streams with a
file, the extra information is lost when the file is attached to an email message or when it is
stored in an archive such as a ZIP.
Automatically adding filename extensions
On Windows a file must have a filename extension for it to be correctly recognized by the
applications operating on it; so there is almost never a reason for not including the extension
that is appropriate for the file's type.
Even on Mac OS X, while it is not a requirement, there seem to be several factors in favor of
including filename extensions when working with automated processes:
• It makes an implicit attribute explicit for the human operator, avoiding confusion (i.e. the
operator and the system might interpret the file type differently if it was not made explicit).
• It allows files to be more easily interchanged with foreign systems (which may happen even
if it is not currently planned).
Therefore Switch offers a function to automatically add an appropriate filename extension to
arriving files, based on Mac file type information associated with the file. This feature is turned
on by default (recommended), and it can be turned off in the preferences dialog.
Specifically, when Switch detects that a new file has arrived (and the "add filename extension"
feature is enabled), Switch looks for Mac file type information in the following way:
• On Mac OS X, it looks in the file system catalog (this is the easy part).
• On Windows, it looks for an appropriate alternate data stream attached to the file, and it
looks for a dot-underscore file with the same name as the file (in other words, Switch supports
both emulations discussed above).
If Switch finds meaningful Mac file type information, and if it can locate the corresponding
filename extension in its built-in table, and if the file doesn't already have the appropriate
filename extension, Switch will add the filename extension to the file's name. Otherwise the
filename is left unchanged.
195
Enfocus Switch 10