Help us shape the future of Go! Take the 2026 Go Developer Survey

fs

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2021 License: Apache-2.0 Imports: 6 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpandUser

func ExpandUser(path string) (string, error)

ExpandUser expands the ~ in a path to the users home directory TODO: find a lib, or move to a lib TODO: os.user can't be used with cross compiling

func LastModified

func LastModified(search *LastModifiedSearch) (time.Time, error)

LastModified returns the latest modified time for all the files and directories. The files in each directory are checked for their last modified time. TODO: use go routines to speed this up nolint: gocyclo

Types

type LastModifiedSearch added in v0.14.0

type LastModifiedSearch struct {
	// Root must be set to the absolute path of the directory to traverse. Any
	// relative paths in Paths and Excludes will be considered relative to this
	// root directory.
	Root     string
	Excludes []string
	Paths    []string
}

LastModifiedSearch provides the means by which to specify your search parameters when finding the last modified file.

Jump to

Keyboard shortcuts

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