tmpfile

package
v0.0.0-...-e8ebaed Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2017 License: MIT Imports: 7 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	Suffix            string
	Dir               string
	CreateIsolatedDir bool
	// NoOverrideIfSuffixEmpty if set signifies that the caller does not want
	// any suffix to be created for them if no suffix was previously provided,
	// that is they want to main the empty suffix.
	NoOverrideIfSuffixEmpty bool
}

type TmpFile

type TmpFile struct {
	// contains filtered or unexported fields
}

func New

func New(ctx *Context) (*TmpFile, error)

func NewInIsolatedDir

func NewInIsolatedDir() (*TmpFile, error)

Invoke this function to create a temp file in an isolated directory

func (*TmpFile) Close

func (tf *TmpFile) Close() error

func (*TmpFile) Dir

func (tf *TmpFile) Dir() string

func (TmpFile) Done

func (tf TmpFile) Done() error

func (*TmpFile) Name

func (tf *TmpFile) Name() string

func (*TmpFile) Path

func (tf *TmpFile) Path() string

func (*TmpFile) Read

func (tf *TmpFile) Read(b []byte) (int, error)

func (*TmpFile) ReadAt

func (tf *TmpFile) ReadAt(b []byte, off int64) (int, error)

func (*TmpFile) Seek

func (tf *TmpFile) Seek(offset int64, whence int) (ret int64, err error)

func (*TmpFile) Stat

func (tf *TmpFile) Stat() (os.FileInfo, error)

func (*TmpFile) Write

func (tf *TmpFile) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

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