anchor.diff:      io_lib:format("~8.16.0b-~4.16.0b-4~3.16.0b-~4.16.0b-~12.16.0b",
                           [A, B, C band 16#0fff, D band 16#3fff bor 16#8000, E]).
   
  -find_file(DataDir, {coc,CoC_Namespace,CoC_Locator}=_CoC_NL, Prefix, N) ->
  -    {_Filename, Path} = machi_util:make_data_filename(DataDir,
  -                                                      CoC_Namespace,CoC_Locator,
  -                                                      Prefix, "*", N),
  -    filelib:wildcard(Path).
  -
   list_files(DataDir, Prefix) ->
       {F_bin, Path} = machi_util:make_data_filename(DataDir, "*^" ++ Prefix ++ "^*"),
       filelib:wildcard(binary_to_list(F_bin), filename:dirname(Path)).
  
positive.code: make_filename_mgr_name(FluName) when is_atom(FluName) ->
      list_to_atom(atom_to_list(FluName) ++ "_filename_mgr").
  
  handle_find_file(Tid, {coc,CoC_Namespace,CoC_Locator}=CoC_NL, Prefix, DataDir) ->
      N = machi_util:read_max_filenum(DataDir, CoC_Namespace, CoC_Locator, Prefix),
      {File, Cleanup} = case find_file(DataDir, CoC_NL, Prefix, N) of
          [] ->
              {find_or_make_filename(Tid, DataDir, CoC_Namespace, CoC_Locator, Prefix, N), false};
          [H] -> {H, true};
          [Fn | _ ] = L ->
              lager:debug(
                "Searching for a matching file to prefix ~p and sequence number ~p gave multiples: ~p",
                [Prefix, N, L]),
              {Fn, true}
      end,
      maybe_cleanup(Tid, {CoC_Namespace, CoC_Locator, Prefix, N}, Cleanup),
      filename:basename(File).
  
  find_or_make_filename(Tid, DataDir, CoC_Namespace, CoC_Locator, Prefix, N) ->
      case ets:lookup(Tid, {CoC_Namespace, CoC_Locator, Prefix, N}) of
           [] ->
              F = generate_filename(DataDir, CoC_Namespace, CoC_Locator, Prefix, N),
              true = ets:insert_new(Tid, {{CoC_Namespace, CoC_Locator, Prefix, N}, F}),
              F;
          [{_Key, File}] ->
              File
  
negative.code:               N),
      binary_to_list(F).
  
  increment_and_cache_filename(Tid, DataDir, {coc,CoC_Namespace,CoC_Locator}, Prefix) ->
      ok = machi_util:increment_max_filenum(DataDir, CoC_Namespace, CoC_Locator, Prefix),
      N = machi_util:read_max_filenum(DataDir, CoC_Namespace, CoC_Locator, Prefix),
      F = generate_filename(DataDir, CoC_Namespace, CoC_Locator, Prefix, N),
      true = ets:insert(Tid, {{CoC_Namespace, CoC_Locator, Prefix}, F}),
      F.
  
  
  
  