tmpdir

package module
v0.0.0-...-06db9c0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2020 License: MIT Imports: 6 Imported by: 0

README

Build Status codecov GoDoc

Documentation

Overview

Package tmpdir manages temporary directories for a server.

Index

Constants

This section is empty.

Variables

Dir is the temporary directory that Setup() created.

Functions

func Cleanup

func Cleanup() error

Cleanup removes the tmp directory.

func MkTemp

func MkTemp(filename string, a ...interface{}) (*os.File, error)

MkTemp creates a unique filename in the temporary directory and returns a writable file descriptor. This function is safe for any arbitrary filename.

Subdirectories are not supported. The Setup() function must be called first.

func MkTempFile

func MkTempFile(filename string, a ...interface{}) (string, error)

MkTempFile behaves like MkTemp, but returns the path to a file (which is created) instead of a file descriptor.

func Setup

func Setup(path string) (err error)

Setup creates an unique temporary directory.

Types

This section is empty.

Jump to

Keyboard shortcuts

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