ignore

package
v0.14.25-rc.1 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2017 License: MPL-2.0 Imports: 12 Imported by: 5

Documentation

Index

Constants

View Source
const (
	WindowsTempPrefix = "~syncthing~"
	UnixTempPrefix    = ".syncthing."
)

Variables

View Source
var TempPrefix string

Functions

func IsInternal added in v0.14.14

func IsInternal(file string) bool

IsInternal returns true if the file, as a path relative to the folder root, represents an internal file that should always be ignored. The file path must be clean (i.e., in canonical shortest form).

func IsTemporary added in v0.14.20

func IsTemporary(name string) bool

IsTemporary is true if the file name has the temporary prefix. Regardless of the normally used prefix, the standard Windows and Unix temp prefixes are always recognized as temp files.

func TempName added in v0.14.20

func TempName(name string) string

Types

type Matcher

type Matcher struct {
	// contains filtered or unexported fields
}

func New

func New(withCache bool) *Matcher

func (*Matcher) Hash

func (m *Matcher) Hash() string

func (*Matcher) Load

func (m *Matcher) Load(file string) error

func (*Matcher) Match

func (m *Matcher) Match(file string) (result Result)

func (*Matcher) Parse

func (m *Matcher) Parse(r io.Reader, file string) error

func (*Matcher) Patterns

func (m *Matcher) Patterns() []string

Patterns return a list of the loaded patterns, as they've been parsed

func (*Matcher) ShouldIgnore added in v0.14.20

func (m *Matcher) ShouldIgnore(filename string) bool

ShouldIgnore returns true when a file is temporary, internal or ignored

func (*Matcher) Stop

func (m *Matcher) Stop()

type Pattern

type Pattern struct {
	// contains filtered or unexported fields
}

func (Pattern) String

func (p Pattern) String() string

type Result added in v0.13.0

type Result uint8

func (Result) IsCaseFolded added in v0.13.0

func (r Result) IsCaseFolded() bool

func (Result) IsDeletable added in v0.13.0

func (r Result) IsDeletable() bool

func (Result) IsIgnored added in v0.13.0

func (r Result) IsIgnored() bool

Jump to

Keyboard shortcuts

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