fs

package
v0.4.17 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: Apache-2.0 Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FS

type FS interface {
	billy.Filesystem

	CheckExistsOrWrite(filename string, data []byte) (bool, error)

	// Exists checks if the provided path exists in the provided filesystem.
	Exists(path string) (bool, error)

	// ExistsOrDie checks if the provided path exists in the provided filesystem, or panics on any error other then ErrNotExist
	ExistsOrDie(path string) bool

	// ReadFile returns the entire file as []byte
	ReadFile(filename string) ([]byte, error)

	// ReadYamls reads the file data as yaml into o
	ReadYamls(filename string, o ...interface{}) error

	// WriteYamls writes the data as yaml into the file
	WriteYamls(filename string, o ...interface{}) error

	// ReadJson reads the file data as json into o
	ReadJson(filename string, o interface{}) error

	// WriteJson writes the data as json into the file
	WriteJson(filename string, o interface{}) error
}

func Create

func Create(bfs billy.Filesystem) FS

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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