anchor.diff:  
   -include("../include/yaws_api.hrl").
   -include("../include/yaws_dav.hrl").
  +-include_lib("kernel/include/file.hrl").
  +
   
   -define(elog(X,Y), error_logger:info_msg("*elog ~p:~p: " X,
   					[?MODULE, ?LINE | Y])).
  +
   
   -define(IS_PROPFIND(A), (A#arg.req)#http_request.method == "PROPFIND").
   -define(IS_MKCOL(A), (A#arg.req)#http_request.method == "MKCOL").
  
positive.code:     propfind(A);
  out(A) when ?IS_MKCOL(A) ->
      create_directory(A);
  out(A) ->
      out403().
  
  propfind(A) ->
  
negative.code:     case depth(A) of
  	0 ->
  	    ?elog("propfind: Depth=0~n", []),
  	    Response = depth_zero(A),
  	    MultiStatus = [{multistatus, [{'xmlns',"DAV:"}], Response}],
  	    B = yaws_dav:xml_expand(MultiStatus),
  	    out207(B);
  	1 ->
  	    %% FIXME should get root dir from yaws.conf
  	    Entries = get_entries(A),
  	    ?elog("propfind: Depth=1 , length(Entries)=~p~n", [length(Entries)]),
  	    Url = "http://struts/dav/",                                % FIXME
  	    F = fun(Finfo) -> response_entry(Finfo, Url) end,
  	    Responses = lists:map(F, Entries),
  	    MultiStatus = [{multistatus, [{'xmlns',"DAV:"}], Responses}],
  	    B = yaws_dav:xml_expand(MultiStatus),
  	    out207(B)
      end.
  
  date_string({{Y,M,D}, {Hr,Min,Sec}}) ->
      lists:concat([D, " ", month(M), " ", Y, " ", Hr, ":", Min, ":", Sec]).
  
  
  
  get_entries(A) ->
      Path = A#arg.docroot ++ A#arg.appmoddata,
      ?elog("propfind: Path=~p~n", [Path]),
      case file:read_file_info(Path) of
  	Dir when Dir#file_info.type == directory ->
  	    {ok, L} = file:list_dir(Path),
  	    [{Name,Entry} || Name <- L,
  			     {ok, Entry} = file:read_file_info(Path++"/"++Name)];
  	Else ->
  	    [Else]
      end.
  
  %%% FIXME should get a proper file_info entry here
  %%
  response_entry({Name, F}, Url) when F#file_info.type == directoy  -> % Dir
      {response, [],
       [{href, [], [Url]},
        {propstat, [], 
         [{prop, [],
  	 [{name, [], [Name]},
  	  {creationdate, [], [date_string(F#file_info.ctime)]}, 
  	  {getlastmodified, [], [date_string(F#file_info.mtime)]},
  	  {getcontentlength, [], [integer_to_list(F#file_info.size)]},
  	  {resourcetype, [], 
  	   [{collection, [], []}]}
  	  %%{ishidden, [], [bool2lnum(F#file.is_hidden)]}]},
  	  ]},
  	{status, [],    % Status 1
  	 ["HTTP/1.1 200 OK"]}]}]};
  %%
  response_entry({Name, F}, Url) when F#file_info.type == regular ->  % File
      {response, [],
       [{href, [], [Url]},
        {propstat, [], 
         [{prop, [],
  	 [{name, [], [Name]},
  	  {creationdate, [], [date_string(F#file_info.ctime)]}, 
  	  {getlastmodified, [], [date_string(F#file_info.mtime)]},
  	  {getcontentlength, [], [integer_to_list(F#file_info.size)]},
  	  {resourcetype, [], []}
  	  %%{ishidden, [], [bool2lnum(F#file.is_hidden)]}]},
  	  ]},
  	{status, [],    % Status 1
  	 ["HTTP/1.1 200 OK"]}]}]};
  %%
  response_entry(F, _Url) ->
      ?elog("ignoring file: ~p~n", [F]),
      [].
  
  
  parse_name(L) ->
      [Rname|_] = string:tokens(lists:reverse(L), "/"),
      lists:reverse(Rname).
  
  create_directory(A) ->
      tbd.
  
  
  depth_zero(A) ->
      Path = A#arg.docroot ++ A#arg.appmoddata,
      Url = "http://struts/dav" ++ A#arg.appmoddata,
      Name = parse_name(Path),
      {ok, F} =  file:read_file_info(Path),
      ?elog("server_parh=~p~n", [A#arg.server_path]),
      [{response, [],
        [{href, [], [Url]},
         {propstat, [], 
  	[{prop, [],
  	  [{name, [], [Name]},
  	   {creationdate, [], [date_string(F#file_info.ctime)]}, 
  	   {getlastmodified, [], [date_string(F#file_info.mtime)]},
  	   {getcontentlength, [], [integer_to_list(F#file_info.size)]},
  	   {resourcetype, [], 
  	    [{collection, [], []}]}
  	   %%{ishidden, [], [bool2lnum(F#file.is_hidden)]}]},
  	  ]},
  	 {status, [],   
  	  ["HTTP/1.1 200 OK"]}]}]}].
  
  
  depth(A) ->
  