# File bin/dskexplorer.rb, line 86
def get_directories_and_files(relative_path)
        directories=[]
        dsk_files=[]
        absolute_path=make_absolute_path(relative_path)
        if root_dir_is_website? then
                html=get_uri_from_cache(absolute_path)
                doc=Hpricot(html)
                doc.search("a[@href]").each do |a|
                        href=URI.unescape(a.attributes["href"])
                        if (href=~/\w\/$/) 
                                if !(href=~/^\//) then      #directories end with a /, but skip absolute paths
                                        directories<<(href)
                                end
                        elsif DSK.is_dsk_file?(href) then
                                dsk_files<<(href)
                        end
                end
        else 
                if File.exist?(absolute_path) && (File.stat(absolute_path).directory?) then
                        dir=Dir.new(absolute_path)
                        dir.each do |f| 
                                directories<<f if (f[0].chr!=".") && (File.stat(absolute_path+"/"+f).directory?)
                                dsk_files<<f if (DSK.is_dsk_file?(f))
                        end
                end
        end
        [directories,dsk_files]
end