def ls(dir = ".")
      dir = dir.location if dir.is_a? FolderObject
      dir = File.expand_path(dir,@current_dir)[1..-1]
      dir = nil if dir == ""
      begin
        request("browseService","getItems",[dir])['result']['items'].collect do |hash|
          case hash.name
          when "air.video.DiskRootFolder", "air.video.ITunesRootFolder","air.video.Folder"
            FolderObject.new(self,hash['name'],hash['itemId'])
          when "air.video.VideoItem","air.video.ITunesVideoItem"
            VideoObject.new(self,hash['name'],hash['itemId'],hash['detail'] || nil)
          else
            raise NotImplementedError, "Unknown: #{hash.name}"
          end
        end
      rescue NoMethodError
        raise RuntimeError, "This folder does not exist"
      end
    end
def ls(dir = ".")
      dir = dir.location if dir.is_a? FolderObject
      dir = File.expand_path(dir,@current_dir)[1..-1]
      dir = nil if dir == ""
      begin
        request("browseService","getItems",[dir])['result']['items'].collect do |hash|
          case hash.name
          when "air.video.DiskRootFolder", "air.video.ITunesRootFolder","air.video.Folder"
            FolderObject.new(self,hash['name'],hash['itemId'])
          when "air.video.VideoItem","air.video.ITunesVideoItem"
            VideoObject.new(self,hash['name'],hash['itemId'],hash['detail'] || nil)
          else
            raise NotImplementedError, "Unknown: #{hash.name}"
          end
        end
      rescue NoMethodError
        raise RuntimeError, "This folder does not exist"
      end
    end
Lists the folders and videos in the current directory as an Array of AirVideo::VideoObject and AirVideo::FolderObject objects.