code: def copy2(src, dst):
      
      if os.path.isdir(dst):
          dst = os.path.join(dst, os.path.basename(src))
      copyfile(src, dst)
      copystat(src, dst)
docs: Copy data and all stat info ("cp -p src dst").
  
      The destination may be a directory.