Documentation
¶
Overview ¶
Package tempdir provides helpers for temporary directories.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidFuncType indicates that an invalid type was provided. ErrInvalidFuncType = errors.New("invalid func type") )
Functions ¶
Types ¶
type Dir ¶
type Dir struct {
// contains filtered or unexported fields
}
A Dir represents a temporary directory. Dir must be constructed with New or NewWithBase.
func New ¶
New creates a new Dir using the system's default temporary directory as the base for this temporary directory.
func NewWithBase ¶
NewWithBase creates a new Dir using the provided dir as the base for this temporary directory.
type Func ¶
type Func interface { PathFunc | PathErrorFunc }
Func constrains the types of functions allowed by With (and opaqely, Dir.With).
type PathErrorFunc ¶
A PathErrorFunc is a function that accepts a temporary path and returns an error.
Click to show internal directories.
Click to hide internal directories.