fs

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: MIT Imports: 3 Imported by: 12

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