parameters: (src, dst)
docstring: Copies a file if the destination does not exist or is older.
docstring_summary: Copies a file if the destination does not exist or is older.
docstring_tokens: Copies a file if the destination does not exist or is older .
function: def _update_file(src, dst):
      """Copies a file if the destination does not exist or is older."""
      if Path(dst).exists():
          src_stat = os.stat(src)
          dst_stat = os.stat(dst)
          if src_stat.st_mtime - dst_stat.st_mtime <= 0:
              print("Copy skipped: {}".format(dst))
              return
      print("Copy: {}\n   -> {}".format(src, dst))
      shutil.copy2(src, dst)
function_tokens: def _update_file ( src , dst ) : if Path ( dst ) . exists ( ) : src_stat = os . stat ( src ) dst_stat = os . stat ( dst ) if src_stat . st_mtime - dst_stat . st_mtime <= 0 : print ( "Copy skipped: {}" . format ( dst ) ) return print ( "Copy: {}\n   -> {}" . format ( src , dst ) ) shutil . copy2 ( src , dst )