Documentation ¶
Overview ¶
package tempfile provides a way to create temporary files preserving extension and setting permissions
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Opts ¶
type Opts func(*request)
func KeepingExtension ¶
func KeepingExtension() Opts
KeepingExtension ensures the extension of the filename is preserved when creating the temporary file. It has not affect if `WithName` is not also used.
func WithDir ¶
WithDir sets the subdirectory to contain the temporary file. If dir is absolute, it will be used as-is, otherwise it will be taken relative to the system temporary directory (os.TempDir).
Click to show internal directories.
Click to hide internal directories.