Subject: RE: Hidden Files Not Being Copied

From: Michalowski Thierry <[email-masked]>
Date: Fri, 19 Jan 2001 13:32:40 +0100

OK folks, let's clarify something on the U*X side.

A file beginning with a . is definitely NOT MEANT to be "invisible".
It is only that the default "ls" command behaviour is to filter out these
files, for readability purposes.
And the default shell wildcard, "*", too.

Any other thingy (command, API) in the U*X world "sees" everything in a
directory.

<Proof>
Proof program in Perl:
----cut there----
#!/usr/local/bin/perl
exit unless @ARGV;
$dir = shift @ARGV;
opendir(DIR,$dir);
print "Dir entries are: ", join("\n",readdir(DIR)), "\n";
closedir(DIR);
----cut there----

Run this with any directory as the first argument and you will get a listing
of all files in it.
You see, no filter, just a plain readdir() which is the exact equivalent of
the native C-language one.
</Proof>

Moreover, as some people already pointed out, a dot-file is a valid name on
a Mac.

Given that, I wonder HOW anyone is supposed to justify that netatalk would
by any mean translate a dot-file into an invisible file.

My personal point of view would be to be horrified by such a beast!
Of course, implementing whatever the community want is possible, such as
"Veto" files as in SaMBa . But please: don't make it the default, for the
sake of my rest! :-)

HTH
Thierry

-----Original Message-----
From: Ray Zimmerman [mailto:[email-masked]]
Sent: Thursday, January 18, 2001 6:36 PM
To: Netatalk List
Subject: Re: Hidden Files Not Being Copied

At 10:30 AM -0500 1/18/01, Bill Moran wrote:
>I'm not terribly familiar with Macs, how do you set a file to be
>invisible?

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.

I should also mention that on MacOS a filename starting with a . is 
NOT an illegal name. Or to get rid of the double negative ... it's 
JUST FINE. I have .htaccess files on my Mac and they've never behaved 
any differently than files with other names.

The problem is that in *nix the . means it's invisible, whereas on 
the Mac it just means that you wanted to call your file .<something> 
... netatalk has to try to do what you want and I think it seems to 
be doing pretty close to the right thing, though it does seem that it 
could take .files (with the exception of .AppleDouble) and treat them 
as .files with the invisible bit set (I see no need to change the 
name). This way they would be "seen" by the MacOS (but not by the Mac 
user) and hence copied along with the enclosing folder.

Thoughts?

	Ray

---

From: Duncan Sinclair <[email-masked]>
Date: Fri, 19 Jan 2001 14:55:38 +0000

Hi,

>OK folks, let's clarify something on the U*X side.

Let's do a similar clarification on the Mac side then...

>And the default shell wildcard, "*", too.

A file marked "hidden" on the Mac is NOT "invisible".
It is only that the behaviour of the Finder is to filter out these
files, for simplicity.

>Any other thingy (command, API) in the U*X world "sees" everything in a

Any other thing (e.g. standard file open dialogue) in the Mac world
"sees" everything in the folder.

(Unless it has been filtered for not being the right type.)

>by any mean translate a dot-file into an invisible file.

Because people on the Mac don't want to see dot files for the same reasons
as people on Unix don't want to see them.

>"Veto" files as in SaMBa . But please: don't make it the default, for the

Well the current, default behaviour is as you describe - dotfiles
cannot be seen at all on the Mac - are you horrified?  Are you
still sleeping?  :-)

The fact is that dot files on Unix and hidden files on Mac exist
is really for the same reason - to keep important-to-the-system,
but un-important-to-the-user, files away from the user so that
they can get on with their tasks without extra hassle.

(e.g. Typical "Joe MacUser" would try to trash "Desktop" files found
lying around.  Typical (niave) unix user might not like seeing ~100
odd dot files in his/her home directory (e.g. .Xauthority) and might
try "rm -rf .*" - don't try this at home folks!)

Same objective, different methodology, same result.

Cheers,

Duncan.

PS> If you've read this far, thanks...  Now does anyone know if the
latest version of Netatalk compiles and works on Solaris (7)?

---

From: Bob Rogers <[email-masked]>
Date: Fri, 19 Jan 2001 12:13:09 -0500

From: Duncan Sinclair <[email-masked]>
   Date: Fri, 19 Jan 2001 14:55:38 +0000

I would go further.  Dot-files on Unix generally exist for Unix-specific
purposes, and hidden files on the Mac exist for Mac-specific purposes,
so it is pointless at best, and possibly counterproductive, to move them
from Unix to Mac or vice versa.  That is why I think netatalk's default
behavior with respect to dot-files is optimal.

					-- Bob Rogers