gopass: Index | Files

package fsutil

import ""


Package Files

fsutil.go umask.go

func CleanFilename Uses

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 Uses

func CleanPath(path string) string

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

func IsDir Uses

func IsDir(path string) bool

IsDir checks if a certain path exists and is a directory

func IsEmptyDir Uses

func IsEmptyDir(path string) (bool, error)

IsEmptyDir checks if a certain path is an empty directory

func IsFile Uses

func IsFile(path string) bool

IsFile checks if a certain path is actually a file

func Shred Uses

func Shred(path string, runs int) error

Shred overwrite the given file any number of times

func Umask Uses

func Umask() int

Umask extracts the umask from env

Package fsutil imports 11 packages (graph) and is imported by 8 packages. Updated 2021-01-24. Refresh now. Tools for package owners.