anchor.diff:  -author('Andy Gross <andy@basho.com>').
   -author('Dave Smith <dizzyd@basho.com>').
   
  +%% KV Backend API
   -export([start/2,
            stop/1,
            get/2,
  
positive.code:          drop/1,
           is_empty/1,
           callback/3]).
  
  -ifdef(TEST).
  -include_lib("eunit/include/eunit.hrl").
  
negative.code: callback(_State, _Ref, _Msg) ->
      ok.
  
  key_counts() ->
      case application:get_env(bitcask, data_root) of
          {ok, RootDir} ->
              [begin
                   {Keys, _} = status(filename:join(RootDir, Dir)),
                   {Dir, Keys}
               end || Dir <- element(2, file:list_dir(RootDir))];
          {error, Reason} ->
              {error, Reason}
      end.
  
  %% ===================================================================
  %% Internal functions
  %% ===================================================================
  
  %% @private
  %% Invoke bitcask:status/1 for a given directory
  status(Dir) ->
      Ref = bitcask:open(Dir),
      Status = bitcask:status(Ref),
      bitcask:close(Ref),
      Status.
  
  %% @private
  %% Schedule sync (if necessary)
  