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