anchor.diff:  
   %% Generate an etag for the file.
   
  --spec generate_etag(Req, State)
  -		   -> {{strong | weak, binary()}, Req, State}
  -			  when State::state().
  +-spec generate_etag(cowboy_req:req(), state())
  +		   -> {{strong | weak, binary()}, cowboy_req:req(), state()}.
   generate_etag(Req, State={Path, {ok, #file_info{size=Size, mtime=Mtime}}, Extra}) ->
       case proplists:get_value(etag, Extra) of
   	undefined ->
  
positive.code: 
  %% Return the time of last modification of the file.
  
  -spec last_modified(Req, State)
  		   -> {calendar:datetime(), Req, State}
  			  when State::state().
  last_modified(Req, State={_, {ok, #file_info{mtime=Modified}}, _}) ->
      {Modified, Req, State}.
  
  %% Stream the file.
  %% @todo Export cowboy_req:resp_body_fun()?
  
  -spec get_file(Req, State)
  	      -> {{stream, non_neg_integer(), fun()}, Req, State}
  		     when State::state().
  get_file(Req, State={Path, {ok, #file_info{size=Size}}, _}) ->
      Sendfile = fun (Socket, Transport) ->
  		       case Transport:sendfile(Socket, Path) of
  
negative.code: 
  %% Detect the mimetype of the file.
  
  -spec content_types_provided(cowboy_req:req(), state())
  			    -> {[{binary(), get_file}], cowboy_req:req(), state()}.
  content_types_provided(Req, State={Path, _, _}) ->
      {[{cow_mimetypes:all(Path), get_file}], Req, State}.
  
  %% Assume the resource doesn't exist if it's not a regular file.
  
  -spec resource_exists(cowboy_req:req(), state()) -> {boolean(), cowboy_req:req(), state()}.
  resource_exists(Req, State={_, {ok, #file_info{type=regular}}, _}) ->
      {true, Req, State};
  resource_exists(Req, State) ->
  