github.com/haraldrudell/parl@v0.4.176/if-watchfs.go (about) 1 /* 2 © 2022–present Harald Rudell <harald.rudell@gmail.com> (https://haraldrudell.github.io/haraldrudell/) 3 ISC License 4 */ 5 6 package parl 7 8 // a path can be absolute or relative 9 // — a relative path uses the process’ current working directory 10 // 11 // func filepath.Abs(path string) (string, error) 12 // func filepath.IsAbs(path string) bool 13 14 // a path can contain symlinks 15 // 16 // func filepath.EvalSymlinks(path string) (string, error) 17 18 // a path can contain . 19 // a path can contain multiple separators in sequence 20 // a path can contain ..: 21 // — a path can contain inner .. 22 // — a path can seek the root parent directory: "/.." 23 // 24 // func filepath.Clean(path string) string 25 26 // a path can end with separator 27 28 // watch a symlink that is a dir 29 // watch special files 30 31 // Operator read-write-create-delete etc. 32 33 // event contains: 34 // unique event ID, ns timestamp, path, operations 35 36 // event should be an interface that can have 37 // implementation-specific extensions 38 39 // event api is callback 40 // errors and events can happen at any time 41 // therefore the watcher must have some sort of thread 42 // the thread in blocking listen or channel listen 43 44 // Should it be a parl.Go goroutine 45 // or an object with Shutdown 46 // that depends on implementation.