develooper Front page | perl.perl5.porters | Postings from May 2008

Re: One less File::Copy bug

Thread Previous | Thread Next
From:
Johan Vromans
Date:
May 1, 2008 11:32
Subject:
Re: One less File::Copy bug
Message ID:
m21w4lx4d8.fsf@phoenix.squirrel.nl
"Craig A. Berry" <craig.a.berry@gmail.com> writes:

> It's understandable you wouldn't since VMS is probably the only
> supported OS that uses them.

Be careful with what you think -- I've been working quite a lot with
VMS and even helped Digital Equipment Corp. (for thos who do not know:
VMS was not developed by Compaq nor HP) to get the support for Unix
things like stream-LF files and shell globbing right.

Yes, VMS has a much richer set of file attributes than *nix, but that
doesn't mean that *nix has none. Au contraire, things like file
protections (access bits) and file dates are first class file
attributes and should be dealt with accordingly.

> ------
> ...
> For Unix
> systems, C<syscopy> is equivalent to the simple C<copy> routine (and
> is not exportable) since Unix filesystems have no such attributes.
> ------

Yes, it does.

And it is semantically not correct to say thet C<syscopy> is not
exportable since Unix filesystems have no attributes...

> Now, back to what I think you're interested in.  Unix filesystems do
> have timestamps and permission bits (anything else worth noting in the
> file header?).  Should those be preserved by a file copy operation?

Yes.

> Should there be optional parameters to copy() and/or syscopy() to turn
> those features on or off?

No.

>  I would think copy() should do what cp does
> (assuming it does the same thing on all unixish systems) 

'cp' does preserve them.

-- Johan

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About