1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-25 08:59:31 -05:00
forgejo/models/unittest/fscopy.go

16 lines
356 B
Go
Raw Normal View History

// Copyright 2022 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package unittest
import (
"os"
)
// CopyDir copy files recursively from source to target directory.
//
// It returns error when error occurs in underlying functions.
func CopyDir(srcPath, destPath string) error {
return os.CopyFS(destPath, os.DirFS(srcPath))
}