tempfile

package
v1.8.6 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2019 License: MIT Imports: 6 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 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

Jump to

Keyboard shortcuts

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