feat: add miro record as mkdir -p

This commit is contained in:
2026-03-16 22:04:02 +00:00
parent 94bd14f467
commit f37548b56b
3 changed files with 49 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
package miro
import (
"fmt"
"os"
"path/filepath"
)
// Record creates the requested directory path under the resolved test directory.
func Record(path string) (string, error) {
testDir, err := ResolveTestDir()
if err != nil {
return "", fmt.Errorf("failed to resolve test directory: %v", err)
}
target := filepath.Join(testDir, path)
if err := os.MkdirAll(target, 0o755); err != nil {
return "", err
}
return target, nil
}