package fileutils

import "github.com/docker/docker/pkg/fileutils"

Index

Variables

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 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

type MatchInfo = patternmatcher.MatchInfo

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

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

type Pattern

type Pattern = patternmatcher.Pattern

Pattern defines a single regexp used to filter file paths.

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

type PatternMatcher

type PatternMatcher = patternmatcher.PatternMatcher

PatternMatcher allows checking paths against a list of patterns.

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

Source Files

deprecated.go fileutils.go

Version
v23.0.13+incompatible
Published
May 29, 2024
Platform
js/wasm
Imports
5 packages
Last checked
3 minutes ago

Tools for package owners.