develooper Front page | perl.perl5.porters | Postings from July 2013

Recommended file-copying method

Thread Next
From:
Ken Williams
Date:
July 7, 2013 03:20
Subject:
Recommended file-copying method
Message ID:
CACrz-HuYonF5s4ctOrNeSRagRFNRD2t=FGFsEEaUEdBE0S4V-w@mail.gmail.com
I'm about to add a $file->copy($destination) method to Path::Class.  I was
about to use File::Copy's copy() function, but then I noticed the cp() and
syscopy() alternatives, each of which has additional niceties (the former
preserves permissions - the latter seems to DTRT better on Windows and
other non-Unixalikes) but neither has both niceties people probably want.

Is there a better alternative?  Or does someone want to convince me one of
these things is the right one?

 -Ken

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