fs

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoFiles is an error for no files found at all
	ErrNoFiles = errors.New("no files")
)

Functions

func CreateDir

func CreateDir(path string) error

CreateDir creates directories recursively

func DirExists

func DirExists(path string) bool

DirExists checks if a directory exists

func DirIsEmpty added in v0.2.0

func DirIsEmpty(path string) (bool, error)

DirIsEmpty checks if a directory is empty

func EditFile

func EditFile(path string, editor string) error

EditFile opens a file in the default editor and waits for the process to finish

func FileExists

func FileExists(path string) bool

FileExists checks if a file exists

func FindLatests

func FindLatests(path string, isDir bool) (string, string, error)

FindLatests finds the "latest" file or directory in a file, by name

func Sanitize

func Sanitize(file string) string

Sanitize makes stings filename compatible

Types

This section is empty.

Jump to

Keyboard shortcuts

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