fileutils

package
v23.0.7+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

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

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

func CreateIfNotExists(path string, isDir bool) error

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

func GetTotalUsedFds

func GetTotalUsedFds() int

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

func ReadSymlinkedDirectory

func ReadSymlinkedDirectory(path string) (string, 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