Back to

Package tempfile

Latest Go to latest
Published: Jul 26, 2019 | License: MIT | Module:


Package Files

type File

type File struct {
	// contains filtered or unexported fields

File is a temporary file

func New

func New(ctx context.Context, prefix string) (*File, error)

New returns a new tempfile wrapper

func (*File) Close

func (t *File) Close() error

Close implements io.WriteCloser

func (*File) Name

func (t *File) Name() string

Name returns the name of the tempfile

func (*File) Remove

func (t *File) Remove(ctx context.Context) error

Remove attempts to remove the tempfile

func (*File) Write

func (t *File) Write(p []byte) (int, error)

Write implement io.Writer

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier