Article View: comp.sys.next.misc
Article #4933Re: Apple disks
From: Gordon Van Huizen
Date: Tue, 26 Jan 1993 18:07
Date: Tue, 26 Jan 1993 18:07
127 lines
5735 bytes
5735 bytes
In article <C1FEMx.4uz@ra.nrl.navy.mil> heinle@cmf.nrl.navy.mil (Glenn Heinle) writes: > Once an Apple disk (floppyh or CD-ROM) is mounted, is > there a way to access the three forks (data, resource, and > info)? I believe what you see is the data fork, and I heard > there is a way to get to the resource fork. > Here's an update to my standard blurb on Mac disks under NeXTSTEP 3.0 that I posted a few months back. I'm re-posting the thing in its entirety in case it can can help other users in general. Perhaps this should become part of some periodic posting for FAQ? Gordon ------------------------------------------------------------------ Using the Workspace Manager File Viewer ======================================= On the Macintosh, a file has two components: a data fork and a resource fork. When using the Workspace file viewer to copy and move Mac files, only the data fork will be moved. That considered... * DO NOT use the NeXT as a pass through for Mac files. You will lose the resource fork in the process. For example, DON'T copy a file from a Mac SyQuest or hard disk onto a NeXT filesystem and subsequently copy it onto a Mac floppy unless you are *sure* that you will only need what is contained in the data fork. * DO NOT place a Mac file on a NeXT disk volume if you intend to later access the resource fork - it won't be there. Examples where the resource fork is vital are PostScript fonts and many forms of Mac sound files. FloppyWorks, Executor and NeXTSTEP 3.0 ====================================== If you are having difficulty mounting Mac disks, open the console window from the Workspace. If a message such as: Mac File System: Initialized Nov 25 12:29:52 Workspace: Mounted floppy disk at /Mac Disk isn't displayed, and there are no error messages regarding bad reads, it's possible that your system has at one time had FloppyWorks or an older version of Executor installed. FloppyWorks and NeXTSTEP 3.0 are incompatible for mounting Mac floppies, hard disks and SyQuest volumes. If you have ever used FloppyWorks on your system, NeXTSTEP 3.0 will not be able to correctly mount Mac disk volumes. If you wish to mount Mac disk volumes via NeXTSTEP 3.0, in addition to removing FloppyWorks you will need to log in as root and remove /usr/filesystems/macintosh.fs. Leave /usr/filesystems/mac.fs there. When you reboot you will be able to insert a Mac disk into your NeXT floppy drive and have it show up in the Workspace file viewer. I understand a very similar thing occurs when using older versions of Executor. The current version of Executor (1.2.1) works flawlessly with NeXTSTEP 3.0 for handling Mac floppies. When it or HFS_XFer are running, they will directly accept mounted Mac disks. When quitting either application, NeXTSTEP 3.0 is once again put back in control and mounted Mac disks appear in the Workspace file viewer. Transparent and very cool. Executor has special code which can directly access the data fork, resource fork and Finder information. Accessing the Resource Fork From a Program ========================================== If you are using an application that has been written to access Mac resource forks under NeXTSTEP 3.0, it will just work with one exception noted below. If you are writing programs that wish to access Macintosh resource forks under NeXTSTEP 3.0, add a .#rsrc# extension to the file name to open() it. If the open fails, there is no resource fork or NeXTSTEP couldn't get at it. If you are having difficulty accessing a Mac resource fork from a program, either as a user or a programmer, open the console window from the Workspace. The implementation of Mac filesystem support has a wimpy size restriction on path names. It is very common to see a message such as the following: macfs: ERROR: DFS: macPort.c/ditPathToMacPath: 15042 Name too long. When that happens the program will not be able to open the resource fork and, depending on the program, different error states could occur. To avoid the problem, rename folders on the Mac disk to make the path name shorter. Accessing the Resource Fork From the Command Line ================================================= If you need to copy the resource fork (as you may have under FloppyWorks for example), you will need to open a terminal window and copy it via the command line. If you want to copy the resource fork of a file named TEST you will need to copy TEST.#rsrc# to copy the resource fork. Note that if you do an ls containing a wildcard, no .#rsrc# will show up even if they are there. An ls for a particular .#rsrc# (such as TEST.#rsrc#) will work. Accessing the Finder information ================================ Macintosh files also contain information maintained by the Mac Finder - the file's creator, type, etc. This information is not available via NeXTSTEP 3.0. -- ---------------------------------------------------------------- Gordon Van Huizen vox: 619.488.9411 fax: 619.488.3045 Metrosoft gvh@metrosoft.com [NeXTmail welcome] ----------------------------------------------------------------
Technical Details
Message-ID:
<1993Jan26.180716.9146@metrosoft.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!elroy.jpl.nasa.gov!swrinde!gatech!hubcap!ncrcae!ncrhub2!ncrgw2!psinntp!hd0258!gvhReferences:
<C1FEMx.4uz@ra.nrl.navy.mil>Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.misc Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!elroy.jpl.nasa.gov!swrinde!gatech!hubcap!ncrcae!ncrhub2!ncrgw2!psinntp!hd0258!gvh From: gvh@metrosoft.com (Gordon Van Huizen) Subject: Re: Apple disks Message-ID: <1993Jan26.180716.9146@metrosoft.com> Sender: gvh@metrosoft.com Reply-To: gvh@metrosoft.com (Gordon Van Huizen) Organization: Metrosoft References: <C1FEMx.4uz@ra.nrl.navy.mil> Date: Tue, 26 Jan 1993 18:07:16 GMT Lines: 127