ostools

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EmptyDir

func EmptyDir(path string) error

Totally removes and recreates the given path.

func MkdirAll

func MkdirAll(path string) error

Tiny wrapper around the default os.MkdirAll but apply standard permissions.

func OpenAppend

func OpenAppend(name string) (*os.File, error)

Open or create the file to append data only. It also creates intermediate directories as needed.

func RemovePattern

func RemovePattern(pattern string) error

Remove all files matching the given pattern.

func WriteFile

func WriteFile(name string, data []byte) error

Tiny wrapper around the default os.WriteFile but creates any directory needed before attempting to write the file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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