gapi, lang: gapi: Make dir to avoid errors

It seems we sometimes need to make the intermediate dir.
This commit is contained in:
James Shubin
2025-01-17 23:25:06 -05:00
parent a713c08585
commit b392285e1d
2 changed files with 11 additions and 0 deletions

View File

@@ -89,3 +89,9 @@ func CopyDirToFsForceAll(fs engine.Fs, src, dst string) error {
func CopyDirContentsToFs(fs engine.Fs, src, dst string) error {
return util.CopyDiskContentsToFs(fs, src, dst, false)
}
// MkdirAllOnFs writes a dir to a dst path on fs. It makes the parent dirs if
// they don't exist.
func MkdirAllOnFs(fs engine.WriteableFS, dst string, perm os.FileMode) error {
return fs.MkdirAll(dst, perm)
}