cluster: add MkdirAll() support
Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
@@ -60,6 +60,13 @@ func (m *Machine) WriteStringFile(value string, name string, args ...any) error
|
||||
return m.zone.zones.WriteStringFile(value, fullName)
|
||||
}
|
||||
|
||||
// MkdirAll creates directories relative to the machine's config directory
|
||||
func (m *Machine) MkdirAll(name string, args ...any) error {
|
||||
fullName := m.getFilename(name, args...)
|
||||
|
||||
return m.zone.zones.MkdirAll(fullName)
|
||||
}
|
||||
|
||||
func (m *Machine) getFilename(name string, args ...any) string {
|
||||
if len(args) > 0 {
|
||||
name = fmt.Sprintf(name, args...)
|
||||
|
||||
Reference in New Issue
Block a user