RE: Hidden Files Not Being Copied


Subject: RE: Hidden Files Not Being Copied
From: Vaughn, George (GVaughn@IrwinBF.com)
Date: Thu Jan 18 2001 - 13:47:19 EST


Macs don't create files without resource forks. If a file exists on a MacOS
filesystem (FS), it has a resource fork. If a file is copied to a MacOS FS
without a resource fork, one is created as soon as MacOS looks in the
directory (this is why MacOS takes a while for DOS-formatted disk contents
to appear, it's creating resource forks for the contents of the viewed
directory).

Netatalk appears to translate the resource forks to the Linux attributes
(probably via the .AppleDouble file) and vice versa, but the resource forks
*definitely* exist on the MacOS FS, and that *is* where the permissions,
date created, date modified, etc. info exists, as well as the visibility
flag and custom icons (years of resource fork editing via resEdit experience
talking here).

Macs can create files with anything in the filename except ":" or "/" on any
local system, as far as I know. The MacOS hasn't had a problem with leading
periods since at least 1996. The problem that's being seen with the ":e2"
replacing the "." is something occuring in Netatalk (at a guess, to prevent
the files from becoming invisible).

There's my $.02

George Vaughn
gvaughn@irwinbf.com

-----Original Message-----
From: Ray Zimmerman [mailto:rz10@cornell.edu]
Sent: Thursday, January 18, 2001 10:14 AM
To: Bill Moran
Cc: Netatalk List
Subject: Re: Hidden Files Not Being Copied

At 12:58 PM -0500 1/18/01, Bill Moran wrote:
> > Each file has a set of attributes stored with it indicating whether
>> it is visible, the file type, creator app, whether it is locked, etc.
>
>Is this part of the resource fork?

I'm not 100% sure where it is stored, but I think it's part of the
file system definition (wherever file create and mod dates are
stored). It's definitely not in the resource fork though, because
files with no resource fork have this info.

>If so, how is this resource fork represented through Netatalk? The
>invisible attribute could be stored there as well.

I believe it is. IIRC the AppleDouble format stores the resource fork
as well as these extra file attributes not included in other files
systems. If you create files on the Mac and copy them to netatalk all
of these attributes stay intact. If the file starts with a . that
gets encoded when copied to a netatalk volume.

>Another thought: Why are dotfiles ignored to begin with? Why not just
>hide the .AppleDouble and .AppleDesktop files but show other dotfiles?

The only way to get a dotfile is to create it on the *nix side I
believe, in which case it is intended to be invisible. So I still
think it should be made available to the Mac side, but as a file with
the invisible bit set.

Next best would be just to make them available as visible files.

        Ray



This archive was generated by hypermail 2b28 : Sun Oct 14 2001 - 03:04:31 EDT