def fetch_items_from_filesystem_or_zip
      unless in_zip?
        @items = Dir.foreach(current_dir).map {|fn|
          load_item dir: current_dir, name: fn
        }.to_a.partition {|i| %w(. ..).include? i.name}.flatten
      else
        @items = [load_item(dir: current_dir, name: '.', stat: File.stat(current_dir)),
          load_item(dir: current_dir, name: '..', stat: File.stat(File.dirname(current_dir)))]
        zf = Zip::File.new current_dir
        zf.each {|entry|
          next if entry.name_is_directory?
          stat = zf.file.stat entry.name
          @items << load_item(dir: current_dir, name: entry.name, stat: stat)
        }
      end
    end
def fetch_items_from_filesystem_or_zip
      unless in_zip?
        @items = Dir.foreach(current_dir).map {|fn|
          load_item dir: current_dir, name: fn
        }.to_a.partition {|i| %w(. ..).include? i.name}.flatten
      else
        @items = [load_item(dir: current_dir, name: '.', stat: File.stat(current_dir)),
          load_item(dir: current_dir, name: '..', stat: File.stat(File.dirname(current_dir)))]
        zf = Zip::File.new current_dir
        zf.each {|entry|
          next if entry.name_is_directory?
          stat = zf.file.stat entry.name
          @items << load_item(dir: current_dir, name: entry.name, stat: stat)
        }
      end
    end
Fetch files from current directory or current .zip file.