files

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package files

Package files

Index

Constants

View Source
const (
	UserReadWritePerm        os.FileMode = 0o600
	UserReadWriteExecutePerm os.FileMode = 0o700
)

Variables

This section is empty.

Functions

func BaseNameWithoutExtension

func BaseNameWithoutExtension(fileName string) string

func ChecksumFromFile added in v0.3.7

func ChecksumFromFile(filePath string) (string, error)

func Copy

func Copy(srcPath string, dstPath string) (err error)

Copy copies the contents of the file at srcPath to a regular file at dstPath. If the file named by dstPath already exists, it is truncated. The function does not copy the file mode, file permission bits, or file attributes. @todo replace with os.CopyFS when released @see https://github.com/golang/go/issues/62484

func DirExists

func DirExists(filePath string) (err error)

func FileExists

func FileExists(filePath string) (err error)

func FilePathExists

func FilePathExists(filePath string) (err error)

func MatchFullDirectoryRelative

func MatchFullDirectoryRelative(directory string) (files []string, err error)

func MatchPatternRelative

func MatchPatternRelative(directory string, pattern string) (files []string, err error)

func MatchPatterns

func MatchPatterns(directory string, patterns ...string) (files []string, err error)

func SortFilesByPath

func SortFilesByPath(files []string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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