def make_navigation_path(relative_path,filename=nil,display_mode=nil)
path_parts=relative_path.split("/")
partial_path=""
s="<a href=/dir/>#{@@root_directory}</a>"
path_parts.each do |p|
if p.length>0 then
partial_path+="/#{p}"
if DSK.is_dsk_file?(partial_path) then
s<<"/<a href=/catalog#{uri_encode(partial_path)}>#{p}</a>"
else
s<<"/<a href=/dir#{uri_encode(partial_path)}>#{p}</a>"
end
end
end
mode_param=""
if !display_mode.nil? then
mode_param="&mode=#{display_mode}"
end
if !filename.nil? then
s<<"/<a href=/showfile/#{uri_encode(relative_path)+'?filename='+uri_encode(filename)}#{mode_param}>#{filename}</a>"
end
directories,dsk_files=get_directories_and_files(relative_path)
s<<"<ul>"
directories.sort.each do |d|
s<<"<li>[dir] <a href=/dir/#{uri_encode(relative_path)}/#{uri_encode(d)}>#{d}</a>\n"
end
dsk_files.sort.each do |f|
s<<"<li>[dsk] <a href=/catalog/#{uri_encode(relative_path)}/#{uri_encode(f)}>#{f}</a> [ <a href=#{uri_encode(@@root_directory+relative_path+'/'+f)}>download</a> ]\n"
end
s<<"</ul>"
s
end