2022-04-01 18:34:57 +02:00
|
|
|
// Copyright 2022 The Gitea Authors. All rights reserved.
|
2022-11-27 19:20:29 +01:00
|
|
|
// SPDX-License-Identifier: MIT
|
2022-04-01 18:34:57 +02:00
|
|
|
|
|
|
|
package unittest
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
)
|
|
|
|
|
|
|
|
// CopyDir copy files recursively from source to target directory.
|
|
|
|
//
|
|
|
|
// It returns error when error occurs in underlying functions.
|
2024-11-10 17:19:46 +01:00
|
|
|
func CopyDir(srcPath, destPath string) error {
|
|
|
|
return os.CopyFS(destPath, os.DirFS(srcPath))
|
2022-04-01 18:34:57 +02:00
|
|
|
}
|