# File bin/dskexplorer.rb, line 247
def show_file(relative_path,filename,display_mode)
        absolute_path=make_absolute_path(relative_path)
        dsk=get_dsk_from_cache(absolute_path)
        file=dsk.files[filename]
        if file.nil? then
                s="<i>#{filename} not found</i>"
        else 
                s="<hl><pre>"
                if display_mode=="hex" then
                        s<<html_escape(file.hex_dump)
                elsif display_mode=="list" && file.respond_to?(:disassembly) then
                        s<<html_escape(file.disassembly)
                elsif display_mode=="png" && file.respond_to?(:to_png) then
                        png_url="/png/#{uri_encode(relative_path)}?filename=#{uri_encode(filename)}"
                        s<<"<IMG SRC=#{png_url} HEIGHT=384 WIDTH=560>"
                else 
                        s<<html_escape(file.to_s)
                end
                s<<"\n</pre><hl>"
        end
        s
end