Documentation
¶
Overview ¶
Package temp provides an interface to handle temporary files and directories.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dir ¶
type Dir struct {
// Name is the name (full path) of the created directory.
Name string
}
Dir is wrapping an temporary directory on disk.
func CreateTempDir ¶
CreateTempDir returns a new Directory wrapping a temporary directory on disk.
type Directory ¶
type Directory interface {
// NewFile creates a new file in that directory. Calling NewFile
// with the same filename twice will result in an error.
NewFile(name string) (io.WriteCloser, error)
// Delete removes the directory and its content.
Delete() error
}
Directory is an interface to a temporary directory, in which you can create new files.
Click to show internal directories.
Click to hide internal directories.