MCPcopy Create free account
hub / github.com/Unpackerr/unpackerr / isExcludedPath

Method isExcludedPath

pkg/unpackerr/folder.go:222–237  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

220}
221
222func (c *FolderConfig) isExcludedPath(path string) bool {
223 if len(c.ExcludePaths) == 0 || path == "" {
224 return false
225 }
226
227 path = filepath.Clean(path)
228
229 for _, exclude := range c.ExcludePaths {
230 exclude = filepath.Clean(exclude)
231 if path == exclude || strings.HasPrefix(path, exclude+string(os.PathSeparator)) {
232 return true
233 }
234 }
235
236 return false
237}
238
239// newWatcher returns a new folder watcher.
240// You must call folders.FSNotify.Close() when you're done with it.

Callers 3

handleFileEventMethod · 0.80
processEventMethod · 0.80

Calls

no outgoing calls

Tested by 1