func (d *Dir) Apply(ctx context.Context, runner plan.Runner, diff plan.Diff) (bool, error) {
	_, err := runner.RunCommand(ctx, fmt.Sprintf("mkdir -p %s", d.Path), nil)
	if err != nil {
		return false, err
	}
	return true, nil
}
Apply implements plan.Resource.
package resource
import (
	"context"
	"fmt"
	"strings"
	"github.com/weaveworks/cluster-api-provider-existinginfra/pkg/plan"
)
type Dir struct {
	Path fmt.Stringer `structs:"path,omitempty"`
	RecursiveDelete bool
}
var _ plan.Resource = plan.RegisterResource(&Dir{})
var protectedDirs = make(map[string]struct{})
func init() {
	for _, dir := range []string{"/", "/etc", "/var", "/dev", "/usr", "/root", "/home", "/opt", "/bin", "/sbin"} {
		protectedDirs[dir] = struct{}{}
	}
}
func (d *Dir) State() plan.State {
	return ToState(d)
}
func (d *Dir) QueryState(ctx context.Context, runner plan.Runner) (plan.State, error) {
	return plan.EmptyState, nil
}