osbuild/mkdir: support parents stage option

The stage supports a `parents` property in stage path options, which
allows one to auto-create any parent directories as needed.

Add the property to stage options implementation.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
Tomáš Hozza 2023-01-18 11:44:09 +01:00 committed by Achilleas Koutsou
parent 5ff2f997f6
commit 7021c305e2

View file

@ -8,9 +8,9 @@ type MkdirStageOptions struct {
}
type MkdirStagePath struct {
Path string `json:"path"`
Mode os.FileMode `json:"mode,omitempty"`
Path string `json:"path"`
Mode os.FileMode `json:"mode,omitempty"` // If not specified, the default mode is 0777
Parents bool `json:"parents,omitempty"` // If true, create parent directories as needed
}
func (MkdirStageOptions) isStageOptions() {}