anchor.diff:      RawInfohash = etorrent_metainfo:get_infohash(Metadata),
       ?assertEqual(Infohash, info_hash_to_hex(RawInfohash)).
   
  +test_read_info() ->
  +    {ok, Infohash} = ?MODULE:copy_torrent(testpath()),
  +    {error, enoent} = ?MODULE:read_info(Infohash).
  +
  +test_write_info() ->
  +    {ok, Infohash} = ?MODULE:copy_torrent(testpath()),
  +    ok = ?MODULE:write_info(Infohash, [{<<"a">>, 1}]),
  +    {ok, [{<<"a">>, 1}]} = ?MODULE:read_info(Infohash).
   -endif.
  
positive.code:                 ?_test(test_copy_torrent()),
                  ?_test(test_info_filename()),
                  ?_test(test_info_hash()),
                  ?_test(test_read_torrent())
              ]}
          ]}
      ]}.
  
negative.code: %% @end
  -spec read_info(binary()) -> {ok, bencode()} | {error, atom()}.
  read_info(Infohash) ->
      Path = info_path(Infohash),
      case file:read_file(Path) of
          {error, _}=Error ->
              Error;
          {ok, Bin} ->
              etorrent_bcoding:decode(Bin)
      end.
  
  %% @doc Rewrite the contents of the .info file of a torrent.
  %% @end
  