MCPcopy
hub / github.com/rclone/rclone / SetUseFilter

Function SetUseFilter

fs/filter/filter.go:739–746  ·  view source on GitHub ↗

SetUseFilter returns a context having (re)set the "use filter" flag

(ctx context.Context, useFilter bool)

Source from the content-addressed store, hash-verified

737
738// SetUseFilter returns a context having (re)set the "use filter" flag
739func SetUseFilter(ctx context.Context, useFilter bool) context.Context {
740 if useFilter == GetUseFilter(ctx) {
741 return ctx // Minimize depth of nested contexts
742 }
743 pVal := new(bool)
744 *pVal = useFilter
745 return context.WithValue(ctx, useFlagContextKey, pVal)
746}
747
748// Reload the filters from the flags
749func Reload(ctx context.Context) (err error) {

Callers 6

TestFilterFunction · 0.92
testFilterSymlinkFunction · 0.92
InternalTestAgeQueryMethod · 0.92
makeListDirMethod · 0.92
WalkFunction · 0.92
ListRFunction · 0.92

Calls 1

GetUseFilterFunction · 0.85

Tested by 3

TestFilterFunction · 0.74
testFilterSymlinkFunction · 0.74
InternalTestAgeQueryMethod · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…