package tempfile

import "cmd/pprof/internal/tempfile"

Package tempfile provides tools to create and delete temporary files

Index

Functions

func Cleanup

func Cleanup()

Cleanup removes any temporary files or directories selected for deferred cleaning. Similar to defer semantics, the nodes are deleted in LIFO order.

func DeferDelete

func DeferDelete(path string)

DeferDelete marks a file or directory to be deleted by next call to Cleanup.

func New

func New(dir, prefix, suffix string) (*os.File, error)

New returns an unused filename for output files.

Source Files

tempfile.go

Version
v1.8.7
Published
Feb 7, 2018
Platform
linux/amd64
Imports
4 packages
Last checked
1 minute ago

Tools for package owners.