gnu cp provides two options --link and --symbolic-link which respectively
hard and symbolic link instead of copying. I find the first particularly
useful as it lets me make a hardlink tree copy of an existing directory
(typically the current development perl source) which uses very little
extra disk space.

I have a perl script which provides the hardlink tree copying functionality,
and I think it would be easy to generalise it to do symbolic links (or
regular copies). My motivation for e-mailing [EMAIL PROTECTED] is I'd like
this functionality for an option I wish to add to the perl smoke testing,
and I'd prefer to not to cut&paste my script code into the smoke program,
but instead break it out into a distinct module available to all.

I've looked at the File::* hierarchy on search.cpan.org, and I can't find
any other module that seems to do this. File::Repl seems to come closest,
but it doesn't yet seem to have the general "Process" function which would
be needed to hardlink rather than copy, or sufficient functions to allow
the copying of directory permissions (which is tricky, as you need to create
new directories early, but change their permissions read only late, otherwise
on Unix you can't create files in them)

So I'm proposing to release a File tree replicating module to CPAN.
However, I'm not sure of a good name, or whether I'm missing an easy way
to do this with existing tools.

Nicholas Clark

Reply via email to