on other systems, uses '_copy_file_contents()' to copy file
contents.
- Return true if the file was copied (or would have been copied),
- false otherwise (ie. 'update' was true and the destination is
- up-to-date)."""
+ Return the name of the destination file, whether it was actually
+ copied or not."""
# XXX if the destination file already exists, we clobber it if
# copying, but blow up if linking. Hmmm. And I don't know what
if update and not newer (src, dst):
if verbose:
print "not copying %s (output up-to-date)" % src
- return 0
+ return dst
try:
action = _copy_action[link]
print "%s %s -> %s" % (action, src, dst)
if dry_run:
- return 1
+ return dst
# On a Mac, use the native file copy routine
if os.name == 'mac':
if preserve_mode:
os.chmod (dst, S_IMODE (st[ST_MODE]))
- return 1
+ return dst
# copy_file ()