Back to godoc.org
github.com/justwatchcom/gopass / pkg / fsutil

package fsutil

v1.8.6
Latest Go to latest
Published: Jul 26, 2019 | License: MIT | Module: github.com/justwatchcom/gopass

Index

func CleanFilename

func CleanFilename(in string) string

CleanFilename strips all possibly suspicious characters from a filename WARNING: NOT suiteable for pathnames as slashes will be stripped as well!

func CleanPath

func CleanPath(path string) string

CleanPath resolves common aliases in a path and cleans it as much as possible

func IsEmptyDir

func IsEmptyDir(path string) (bool, error)

IsEmptyDir checks if a certain path is an empty directory

func IsFile

func IsFile(path string) bool

IsFile checks if a certain path is actually a file

func Shred

func Shred(path string, runs int) error

Shred overwrite the given file any number of times

func Umask

func Umask() int

Umask extracts the umask from env

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier