(path string)
| 220 | } |
| 221 | |
| 222 | func (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. |
no outgoing calls