1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2025-03-30 00:00:14 +01:00
restic/internal/archiver/testing_unix.go
2024-12-03 18:01:59 +05:30

20 lines
477 B
Go

//go:build !windows
// +build !windows
package archiver
import (
"os"
"path/filepath"
"testing"
)
// getTargetPath gets the target path from the target and the name
func getTargetPath(target string, name string) (targetPath string) {
return filepath.Join(target, name)
}
// writeFile writes the content to the file at the targetPath
func writeFile(_ testing.TB, targetPath string, content string) (err error) {
return os.WriteFile(targetPath, []byte(content), 0644)
}