fs

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MockFs afero.Fs

MockFs is a mock, memory-based file system used during unit testing

Functions

This section is empty.

Types

type Fs

type Fs struct {
	// Read-only view of working directory for Kosher (where the executable is)
	WorkingDir *afero.BasePathFs

	// Read-only view of project directory for Kosher
	ProjectDir *afero.BasePathFs

	// Config directory
	ConfigDir *afero.BasePathFs

	// Features directory
	FeaturesDir *afero.BasePathFs

	// Results directory
	ResultsDir *afero.BasePathFs

	// Macros directory
	MacrosDir *afero.BasePathFs

	// Resources directory
	ResourcesDir *afero.BasePathFs
}

Fs abstracts away the file system from the actual OS, and allows the file system to be mocked for testing.

func NewFs

func NewFs(projectDirPath string) (*Fs, error)

NewFs creates a new Fs with the OS file system as the Project directory

Jump to

Keyboard shortcuts

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