fileutils

package
v24.0.0-beta.1+incompa... Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: Apache-2.0 Imports: 6 Imported by: 1,326

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// NewPatternMatcher creates a new matcher object for specific patterns that can
	// be used later to match against patterns against paths
	//
	// Deprecated: use github.com/moby/patternmatcher.New
	NewPatternMatcher = patternmatcher.New

	// Matches returns true if file matches any of the patterns
	// and isn't excluded by any of the subsequent patterns.
	//
	// This implementation is buggy (it only checks a single parent dir against the
	// pattern) and will be removed soon. Use MatchesOrParentMatches instead.
	//
	// Deprecated: use github.com/moby/patternmatcher.Matches
	Matches = patternmatcher.Matches

	// MatchesOrParentMatches returns true if file matches any of the patterns
	// and isn't excluded by any of the subsequent patterns.
	//
	// Deprecated: use github.com/moby/patternmatcher.MatchesOrParentMatches
	MatchesOrParentMatches = patternmatcher.MatchesOrParentMatches
)

Functions

func CopyFile added in v1.7.0

func CopyFile(src, dst string) (int64, error)

CopyFile copies from src to dst until either EOF is reached on src or an error occurs. It verifies src exists and removes the dst if it exists.

func CreateIfNotExists added in v1.7.1

func CreateIfNotExists(path string, isDir bool) error

CreateIfNotExists creates a file or a directory only if it does not already exist.

func GetTotalUsedFds added in v1.7.0

func GetTotalUsedFds() int

GetTotalUsedFds Returns the number of used File Descriptors by reading it via /proc filesystem.

func ReadSymlinkedDirectory added in v1.7.0

func ReadSymlinkedDirectory(path string) (realPath string, err error)

ReadSymlinkedDirectory returns the target directory of a symlink. The target of the symbolic link may not be a file.

Types

type MatchInfo deprecated

type MatchInfo = patternmatcher.MatchInfo

MatchInfo tracks information about parent dir matches while traversing a filesystem.

Deprecated: use github.com/moby/patternmatcher.MatchInfo

type Pattern deprecated

type Pattern = patternmatcher.Pattern

Pattern defines a single regexp used to filter file paths.

Deprecated: use github.com/moby/patternmatcher.Pattern

type PatternMatcher deprecated

type PatternMatcher = patternmatcher.PatternMatcher

PatternMatcher allows checking paths against a list of patterns.

Deprecated: use github.com/moby/patternmatcher.PatternMatcher

Jump to

Keyboard shortcuts

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