ignoreresult

package
v0.0.0-...-b5ba5ed Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: MPL-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package result provides the result type for ignore matching. This is a separate package in order to break import cycles.

Index

Constants

View Source
const (
	NotIgnored R = 0
	// `Ignored` is defined in platform specific files
	IgnoredDeletable = Ignored | deletableBit
	IgnoreAndSkip    = Ignored | canSkipDirBit
)
View Source
const Ignored = ignoreBit

Variables

This section is empty.

Functions

This section is empty.

Types

type R

type R uint8

func (R) CanSkipDir

func (r R) CanSkipDir() bool

CanSkipDir returns true if the result is ignored and the directory can be skipped (no need to recurse deeper). Note that ignore matches are textual and based on the name only -- this being true does not mean that the matched item is a directory, merely that *if* it is a directory, it can be skipped.

func (R) IsCaseFolded

func (r R) IsCaseFolded() bool

IsCaseFolded returns true if the result was a case-insensitive match.

func (R) IsDeletable

func (r R) IsDeletable() bool

IsDeletable returns true if the result is ignored and deletable.

func (R) IsIgnored

func (r R) IsIgnored() bool

IsIgnored returns true if the result is ignored.

func (R) String

func (r R) String() string

String returns a human readable representation of the result flags.

func (R) ToggleIgnored

func (r R) ToggleIgnored() R

ToggleIgnored returns a copy of the result with the ignored bit toggled.

func (R) WithDeletable

func (r R) WithDeletable() R

WithDeletable returns a copy of the result with the deletable bit set.

func (R) WithFoldCase

func (r R) WithFoldCase() R

WithFoldCase returns a copy of the result with the fold case bit set.

func (R) WithSkipDir

func (r R) WithSkipDir() R

WithSkipDir returns a copy of the result with the skip dir bit set.

Jump to

Keyboard shortcuts

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