fs

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2025 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareTimes

func CompareTimes(sources []string, target string) (bool, error)

CompareTimes determines if the target file is newer than the source files. Source files may be glob patterns with shell wildcards and expansion.

func Glob

func Glob(location string, patterns []string) ([]string, error)

func GlobFS

func GlobFS(fsys FS, prefix string, patterns []string) ([]string, error)

GlobFS searches many patterns in a single path/FS

func GlobMany

func GlobMany(locations, patterns []string) ([]string, error)

GlobMany performs a glob search in many locations.

Types

type FS

type FS interface {
	Open(name string) (fs.File, error)
}

type PathInfo

type PathInfo struct {
	CommonParent  string
	RelativePaths []string
}

PathInfo contains the common parent directory and relative paths

func ParentDirWithRelatives

func ParentDirWithRelatives(paths []string) (PathInfo, error)

ParentDirWithRelatives finds the common parent directory and relative paths

Jump to

Keyboard shortcuts

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