tmp

package
v0.20.5 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dir

type Dir interface {
	io.Closer

	AbsPath() string
}

Dir is a temporary directory.

It must be closed when done.

func NewDir

func NewDir(baseDirPath string) (Dir, error)

NewDir returns a new Dir.

baseDirPath can be empty, in which case os.TempDir() is used. This directory will be deleted on interrupt signals.

type File

type File interface {
	io.Closer

	AbsPath() string
}

File is a temporary file

It must be closed when done.

func NewFileWithData

func NewFileWithData(data []byte) (File, error)

NewFileWithData returns a new File.

This file will be deleted on interrupt signals.

Jump to

Keyboard shortcuts

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