From 21e9525e76f6cb1c26a8de1ed9df0de48fcb3d02 Mon Sep 17 00:00:00 2001 From: Matthew Rich Date: Tue, 24 Sep 2024 19:29:11 +0000 Subject: [PATCH] add FilePath --- internal/tempdir/tempdir.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/tempdir/tempdir.go b/internal/tempdir/tempdir.go index 05d00a2..72c6615 100644 --- a/internal/tempdir/tempdir.go +++ b/internal/tempdir/tempdir.go @@ -68,6 +68,10 @@ func (t *Path) CreateFile(name string, content string) (err error) { return } +func (t *Path) FilePath(name string) string { + return filepath.Join(string(*t), name) +} + func (t *Path) Mkdir(name string, mode os.FileMode) (err error) { var path string if path, err = filepath.Abs(filepath.Join(string(*t), name)); err == nil {