fs

package
v1.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Directory

type Directory struct {
	Path string
}

Directory is an instance of the directory manipulation utility.

func MakeDirectory

func MakeDirectory(path string) (Directory, error)

MakeDirectory creates an instance of the Direcotry

func (Directory) Exists

func (dir Directory) Exists() bool

Exists returns true if the directory exists and false if not.

func (Directory) IsFresh

func (dir Directory) IsFresh() bool

IsFresh checks if the Path has been set on the Directory instance.

func (Directory) IsProject

func (dir Directory) IsProject() bool

IsProject returns true/false depending on whether the directory is a project directory.

func (Directory) IsTemplate

func (dir Directory) IsTemplate() bool

IsTemplate returns true/false depending on whether the directory is a template directory.

func (Directory) ProjectPath

func (dir Directory) ProjectPath() string

ProjectPath returns the expected path of the project.yml file or an empty string if the project.yml file was not found.

func (Directory) ReadFile

func (dir Directory) ReadFile(file string) ([]byte, error)

ReadFile reads the file at the path specified, returning the bytes or an error.

func (Directory) ReadTemplateManifest

func (dir Directory) ReadTemplateManifest() ([]byte, error)

ReadTemplateManifest r

func (Directory) TemplatePath

func (dir Directory) TemplatePath() string

TemplatePath returns the expected path of the project.yml file or an empty string if the template.yml file was not found.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL