You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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. }