excludes

package
v0.43.1 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package excludes matches paths against exclude patterns, for the commands that copy directory trees: knot space mirror and knot file sync.

Index

Constants

This section is empty.

Variables

View Source
var Defaults = []string{
	".git/", ".hg/", ".svn/",
	".DS_Store", "Thumbs.db", "desktop.ini",
	".*.swp", ".*.swo", ".*.swn", "*~", ".#*", "#*#", "4913",
}

Defaults are left out of continual and two-way syncs unless asked for: version control internals, which change on every command and only make sense whole, and the scratch files editors and the system write beside the files being edited.

Functions

func Compile

func Compile(patterns []string) func(rel string, isDir bool) bool

Compile returns a function that reports whether a slash-relative path should be skipped. Each pattern is matched against the basename and the full relative path; ancestor matches make excludes transitive (so "node_modules" excludes everything under it).

Types

This section is empty.

Jump to

Keyboard shortcuts

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