anchor.diff: --module(etorrent_io).
  --behaviour(gen_server).
  --include("types.hrl").
  -
  --ifdef(TEST).
  --include_lib("eunit/include/eunit.hrl").
  --endif.
  -
  --define(AWAIT_TIMEOUT, 10*1000).
  -
  -%%
  -%% #File I/O subsystem.
  -%%
  -%% A directory server (this module) is responsible for maintaining
  -%% the opened/closed state for each file in a torrent.
  -%%
  -%% ## Pieces
  +%% @author Magnus Klaar <magnus.klaar@sgsstudentbostader.se>
  +%% @doc File I/O subsystem.
  +%% <p>A directory server (this module) is responsible for maintaining
  +%% the opened/closed state for each file in a torrent.</p>
  +%%
  +%% == Pieces ==
   %% The directory server is responsible for mapping each piece to a set
   %% of file-blocks. A piece is only mapped to multiple blocks if it spans
   %% multiple files.
   %%
  -%% ## Chunks
  +%% == Chunks ==
   %% Chunks are mapped to a set of file blocks based on the file blocks that
   %% contain the piece that the chunk is a member of.
   %%
  -%% ## Scheduling
  +%% == Scheduling ==
   %% Because there is a limit on the number of file descriptors that an
   %% OS-process can have open at the same time the directory server
   %% attempts to limit the amount of file servers that hold an actual
  
positive.code:     NewState = State#state{files_open=WithNewFile},
      {noreply, NewState}.
  
  handle_info({'DOWN', FileMon, _, _, _}, State) ->
      #state{
          torrent=TorrentID,
  
negative.code:     Positions = array:get(Piece, PieceMap),
      {reply, {ok, Positions}, State}.
  
  %% @private
  handle_cast({schedule_operation, RelPath}, State) ->
      #state{
          torrent=TorrentID,
  