converge: github.com/asteris-llc/converge/resource/file/directory Index | Files

package directory

import "github.com/asteris-llc/converge/resource/file/directory"

Index

Package Files

directory.go preparer.go

type Directory Uses

type Directory struct {
    resource.TaskStatus

    // directory path
    Destination string `export:"destination"`

    // if true, directories will be created recursively
    CreateAll bool `export:"createall"`
}

Directory makes sure a directory is present on disk

func (*Directory) Apply Uses

func (d *Directory) Apply(context.Context) (resource.TaskStatus, error)

Apply creates the directory

func (*Directory) Check Uses

func (d *Directory) Check(context.Context, resource.Renderer) (resource.TaskStatus, error)

Check if the directory exists

type Preparer Uses

type Preparer struct {
    // the location on disk to make the directory
    Destination string `hcl:"destination" required:"true" nonempty:"true"`

    // whether or not to create all parent directories on the way up
    CreateAll bool `hcl:"create_all"`
}

Preparer for Directory

Directory makes sure a directory is present on disk

func (*Preparer) Prepare Uses

func (p *Preparer) Prepare(ctx context.Context, render resource.Renderer) (resource.Task, error)

Prepare the new directory

Package directory imports 7 packages (graph) and is imported by 2 packages. Updated 2016-12-25. Refresh now. Tools for package owners.