Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

copy.go 556B

1234567891011121314151617181920
  1. // Copyright 2020 The Gitea Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package util
  5. import (
  6. "github.com/unknwon/com"
  7. )
  8. // CopyFile copies file from source to target path.
  9. func CopyFile(src, dest string) error {
  10. return com.Copy(src, dest)
  11. }
  12. // CopyDir copy files recursively from source to target directory.
  13. // It returns error when error occurs in underlying functions.
  14. func CopyDir(srcPath, destPath string) error {
  15. return com.CopyDir(srcPath, destPath)
  16. }