jpictl: create machine directories on jpictl write
Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
@@ -89,3 +89,11 @@ func (m *Machine) getFilename(name string, args ...any) string {
|
||||
|
||||
return filepath.Join(s...)
|
||||
}
|
||||
|
||||
// MkdirAll creates the directory representing this [Machine]
|
||||
func (m *Machine) MkdirAll() error {
|
||||
base := m.zone.zones.dir
|
||||
fullName := m.getFilename(".")
|
||||
|
||||
return fs.MkdirAll(base, fullName, 0755)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user