fileutil

package
v0.2.11 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultDirFileMode  = 0750
	DefaultFileMode     = 0644
	DefaultExecFileMode = 0755

	DefaultFileFlags = os.O_WRONLY | os.O_CREATE
)

Variables

This section is empty.

Functions

func GetCwd

func GetCwd() string

func IsClosedError

func IsClosedError(e error) bool

Types

type FileWriter

type FileWriter struct {
	// contains filtered or unexported fields
}

FileWriter is a file creation wrapper

func NewFileWriterFS

func NewFileWriterFS(fs afero.Fs) *FileWriter

func (*FileWriter) GetFS

func (fw *FileWriter) GetFS() afero.Fs

func (*FileWriter) WriteCloser

func (fw *FileWriter) WriteCloser(path string, mode os.FileMode) (io.Writer, error)

func (*FileWriter) WriteFile

func (fw *FileWriter) WriteFile(filePath string, content []byte) error

Jump to

Keyboard shortcuts

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