filewriter

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultTmpFolder = "generated"

Variables

This section is empty.

Functions

func Permission0600

func Permission0600(op *FileOptions)

func PersistentFile

func PersistentFile(op *FileOptions)

Types

type FileOptions

type FileOptions struct {
	IsTemp      bool
	Permissions os.FileMode
}

type FileOptionsFunc

type FileOptionsFunc func(op *FileOptions)

type FileWriter

type FileWriter interface {
	Write(fileName string, content []byte, f ...FileOptionsFunc) (path string, err error)
	WithDir(dir string) (FileWriter, error)
	CleanUp()
	CleanUpTemp()
	Dir() string
	TempDir() string
	Create(name string, f ...FileOptionsFunc) (_ io.WriteCloser, path string, _ error)
}

func NewWriter

func NewWriter(dir string) (FileWriter, error)

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