1
0

feat: introduce temp dir helper

This commit is contained in:
dump_stack() 2023-05-13 11:29:25 +00:00
parent 997d6a67ba
commit 5ada1ef41a
Signed by: dump_stack
GPG Key ID: BE44DA8C062D87DC

View File

@ -3,6 +3,8 @@ package fs
import ( import (
"os" "os"
"path/filepath" "path/filepath"
"code.dumpstack.io/tools/out-of-tree/config"
) )
// CaseInsensitive check // CaseInsensitive check
@ -44,3 +46,8 @@ func PathExists(path string) bool {
} }
return true return true
} }
// TempDir that exist relative to config directory
func TempDir() (string, error) {
return os.MkdirTemp(config.Dir("tmp"), "")
}