os

package
v0.35.9 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: Apache-2.0 Imports: 6 Imported by: 2,139

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFile added in v0.34.0

func CopyFile(src, dst string) error

CopyFile copies a file. It truncates the destination file if it exists.

func EnsureDir

func EnsureDir(dir string, mode os.FileMode) error

EnsureDir ensures the given directory exists, creating it if necessary. Errors if the path already exists as a non-directory.

func Exit

func Exit(s string)

func FileExists

func FileExists(filePath string) bool

func TrapSignal

func TrapSignal(logger logger, cb func())

TrapSignal catches SIGTERM and SIGINT, executes the cleanup function, and exits with code 0.

Types

This section is empty.

Jump to

Keyboard shortcuts

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