Back to godoc.org

Package tmp

v0.20.5
Latest Go to latest

The latest major version is .

Published: Jul 24, 2020 | License: Apache-2.0 | Module: github.com/bufbuild/buf

Index

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.

Package Files

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

Jump to identifier

Keyboard shortcuts

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