anchor.diff:      ets:insert(etorrent_dirwatcher, {Key, unmarked}),
       reset_marks(ets:next(etorrent_dirwatcher, Key)).
   
  -start_stop('$end_of_table') -> ok;
  -start_stop(Key) ->
  +sweep('$end_of_table') -> ok;
  +sweep(Key) ->
       [{Key, S}] = ets:lookup(etorrent_dirwatcher, Key),
       case S of
           new -> etorrent_mgr:start(Key);
  
positive.code: %%% Internal functions
  %%--------------------------------------------------------------------
  
  %% Operations
  watch_directories(S) ->
      reset_marks(ets:first(etorrent_dirwatcher)),
      lists:foreach(fun process_file/1,
                    filelib:wildcard("*.torrent", S#state.dir)),
      start_stop(ets:first(etorrent_dirwatcher)),
      ok.
  
  process_file(F) ->
      case ets:lookup(etorrent_dirwatcher, F) of
          [] ->
              ets:insert(etorrent_dirwatcher, {F, new});
  
negative.code:         unmarked -> etorrent_mgr:stop(Key),
                      ets:delete(etorrent_dirwatcher, Key)
      end,
      sweep(ets:next(etorrent_dirwatcher, Key)).
  