file

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File interface {
	// Path is the path of the file.
	Path() string
	// Abs returns the absolute path of the file.
	Abs(ctx context.Context) (string, error)
	// Rel returns the relative path of the file with context cwd.
	Rel(ctx context.Context) (string, error)
	// Value is the content of the file.
	Value() string
	// Bytes is the content of the file.
	Bytes() []byte
}

func NewFile

func NewFile(path string, data []byte) File

NewFile creates a new file.

func NewTextFile

func NewTextFile(path string, data string) File

Jump to

Keyboard shortcuts

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