Re: Hidden Files Not Being Copied


Subject: Re: Hidden Files Not Being Copied
From: Bryn Hughes (bhughes@vcc.bc.ca)
Date: Thu Jan 18 2001 - 12:12:26 EST


It really doesn't sound like it would be impossible to impliment... something along the lines of:

if <filename> starts with '.' then
  if <filename> is not '.AppleDouble' then
    copy file, stripping leading period
    set invisible to true
    

I know that the MacOS by default WILL copy any hidden files/folders in a directory. If you want to see nice evidence of this copy the root level of a Mac's disk to a netatalk share. All the invisible files get copied too. In fact you'll even get messages about copying the desktop printers, as they reside inside the invisible 'Desktop Folder' at the root level of the disk. So in theory files comming FROM a UNIX share that start with a period should be made invisible.

I really don't see any reason to keep anything whatsoever like a period in the beginning of the name once it's on the Mac. It's there in Unix as a flag, it just needs to be paired with the invisible flag on the Mac side.

Actually, that would probably solve a few of the stranger things that happen with invisible folders/files being visible. Is it possible to have netatalk perform this translataion both ways? I.E. files from a Mac with the invisible flag get a period added to their name on the Unix side, and files beginning with a period get an invisible flag when copied to the Mac side. The ideal solution would be to have netatalk seamlessly doing this conversion even with something as simple as a directory listing. That way it would be completely transparent to everyone.

-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Bryn Hughes
Macintosh Tech Support
Information and Computing Services
Vancouver Community College

email:bhughes@vcc.bc.ca
ph: (604) 443-8702
fax: (604) 443-8353
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

>>> Bill Moran <wmoran@mail.iowna.com> - 1/18/01 7:33 AM >>>
Basil Hussain wrote:
>
> Hi all,
>
> > Really, when you think about it, shouldn't Netatalk translate dotfiles
> > to "invisible" files on the Mac? Mangle the filename with an underscore
> > or something. Just a thought/suggestion.
>
> The above suggestion wouldn't really hold water with any kind of
> out-of-the-norm usage, because what if you actually have non-hidden files
> who's names start with underscores? The same applies to almost any character
> you might think of as well.

I can't see how that would cause a problem. The underscore (or whatever
character) is not there to indicate that the file is "invisible", there
would be some sort of flag for that at the filesystem level, like the
hidden/system/readonly attributes on the old DOS fs. The Mac must have
some sort of attributes to indicate that the file is "invisible" (OK, I
admit, I don't KNOW, but how else would it be done) The mangle character
(underscore in this example) would simply make the filename valid for
the Mac. The Mac wouldn't reverse the translation (If you created a file
from the Mac that started with an underscore it wouldn't necessarily be
invisible) However, on the UNIX box, the file would be created starting
with a dot so that it retained its invisible status if it were created
invisible from the Mac. Somewhat the same way long filenames are mangled
to fit old 8.3 notation. It's a translation scheme really, actually you
could do away with the _ altogether, just send the name minus the dot.
You could get filename contention problems, but this to could be dealt
with somehow.

> Could it not be implemented so, that when a folder duplication or copy
> action is perfomed, Netatalk recognises this somehow and checks the contents
> of the folder for hidden 'dot' files/directories (other than .AppleDouble,
> obviously) and sends a message to the client Mac saying if there are?
> Something along the lines of: "The folder you just copied contained <x>
> hidden files and <y> hidden directories. If you wanted to copy these too,
> you must do it manually.".
>
> Although (as pondered in my previous message), if the file copy actions are
> initiated client-side, then this couldn't happen, could it? Or could it?

I'm not terribly familiar with Macs, how do you set a file to be
invisible?
The popup option would be a nice feature, but it seems to me that this
could be implemented in a better manner ... something to ponder on. My
problem is that I'm simply not that familiar with Macs.

-Bill



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