fs

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseOnExec

func CloseOnExec(file *os.File)

CloseOnExec makes sure closing the file on process forking.

func TempFileWithText

func TempFileWithText(text string) (*os.File, error)

TempFileWithText creates the temporary file with the given content, and returns the opened *os.File instance. The file is kept as open, the caller should close the file handle, and remove the file by name.

func TempFilenameWithText

func TempFilenameWithText(text string) (string, error)

TempFilenameWithText creates the file with the given content, and returns the filename (full path). The caller should remove the file after use.

Types

This section is empty.

Jump to

Keyboard shortcuts

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