Returns a chan that will receive a single event representing the first change made to any file matching glob on or after rev. If rev is less than any value passed to st.Clean, Wait will return ErrTooLate.
(glob *Glob, rev int64)
| 331 | // If rev is less than any value passed to st.Clean, Wait will return |
| 332 | // ErrTooLate. |
| 333 | func (st *Store) Wait(glob *Glob, rev int64) (<-chan Event, os.Error) { |
| 334 | if rev < 1 { |
| 335 | rev = 1 |
| 336 | } |
| 337 | |
| 338 | ch := make(chan Event, 1) |
| 339 | wt := &watch{ |
| 340 | glob: glob, |
| 341 | rev: rev, |
| 342 | c: ch, |
| 343 | } |
| 344 | st.watchCh <- wt |
| 345 | |
| 346 | if rev < st.head { |
| 347 | return nil, ErrTooLate |
| 348 | } |
| 349 | return ch, nil |
| 350 | } |
| 351 | |
| 352 | |
| 353 | func (st *Store) Clean(seqn int64) { |
no outgoing calls