tempfile

package
v0.0.0-...-c39e8e5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2022 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	*os.File
	Name        string
	SkipCleanUp bool
}

File is a temp file.

func NewFile

func NewFile(dir, prefix string) (*File, error)

NewFile creates a new temp file.

func (*File) CleanUp

func (f *File) CleanUp() error

CleanUp closes the underlying temp file and removes it.

func (*File) Remove

func (f *File) Remove() error

Remove removes the temp file.

func (*File) Rename

func (f *File) Rename(p string) error

Rename the file to another name.

func (*File) Reset

func (f *File) Reset() error

Reset is an alias for Seek(0, 0) on the file.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL