[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnulib] addition: copy-file.h, copy-file.c

From: Bruno Haible
Subject: Re: [Bug-gnulib] addition: copy-file.h, copy-file.c
Date: Wed, 19 Mar 2003 00:47:51 +0100 (CET)

Paul Eggert wrote:

> > I hope it's not getting boring. Here is a module to copy a regular
> > file. No bells and whistles; only the modification time is copied too.
> Also the access time and the Unix permissions; but ACLs and
> owner/group are not preserved.

There's no portable code I can see that would deal with ACLs, so I
ignore this for now.

But about owner/group, you're right, I'll at a chmod to copy_file.

> I'm a bit leery of calling this function "copy_file", since it does
> things other than copying the file.  There are many options here, and
> I'm not sure it's wise to usurp the name "copy_file" for just one way
> of copying files.

Could you agree to copy_file_preserving ?

> Whatever its name, perhaps the function should take another argument
> specifing exactly which metadata should be copied?

Those who want a full-fledged copy routine can use coreutils. I'm only
interested in a way to make a backup file, i.e. "cp -p", as a small
piece of code that is easy to maintain. As I said, both GNU gettext
and GNU tar need this simple functionality.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]