file

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReadWriteable

type ReadWriteable interface {
	Load(io.Reader) error
	Write(io.Writer) error
	GetFilePath() string
}

ReadWriteable is the interface on which file operations are executed

type ReadWriter

type ReadWriter struct{}

ReadWriter executes file operations

func NewReadWriter

func NewReadWriter() *ReadWriter

NewReadWriter constructs a new ReadWriter

func (*ReadWriter) Exists

func (rw *ReadWriter) Exists(rwable ReadWriteable) bool

Exists evaluates if a file exists

func (*ReadWriter) Overwrite

func (rw *ReadWriter) Overwrite(rwable ReadWriteable) error

Overwrite writes a template to a file, overwriting existing file contents if any

func (*ReadWriter) Read

func (rw *ReadWriter) Read(rwable ReadWriteable) error

Read reads from file

Jump to

Keyboard shortcuts

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