Documentation ¶
Index ¶
- Constants
- Variables
- func IsInternal(file string) bool
- func IsTemporary(name string) bool
- func TempName(name string) string
- func WriteIgnores(path string, content []string) error
- type Matcher
- func (m *Matcher) Hash() string
- func (m *Matcher) Lines() []string
- func (m *Matcher) Load(file string) error
- func (m *Matcher) Match(file string) (result Result)
- func (m *Matcher) Parse(r io.Reader, file string) error
- func (m *Matcher) Patterns() []string
- func (m *Matcher) ShouldIgnore(filename string) bool
- func (m *Matcher) Stop()
- type Pattern
- type Result
Constants ¶
View Source
const ( WindowsTempPrefix = "~syncthing~" UnixTempPrefix = ".syncthing." )
Variables ¶
View Source
var TempPrefix string
Functions ¶
func IsInternal ¶ added in v0.14.14
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
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 WriteIgnores ¶ added in v0.14.28
WriteIgnores is a convenience function to avoid code duplication
Types ¶
type Matcher ¶
type Matcher struct {
// contains filtered or unexported fields
}
func (*Matcher) Lines ¶ added in v0.14.28
Lines return a list of the unprocessed lines in .stignore at last load
func (*Matcher) ShouldIgnore ¶ added in v0.14.20
ShouldIgnore returns true when a file is temporary, internal or ignored
Click to show internal directories.
Click to hide internal directories.