require "activerecord_gfdnavi"

class Directory < NodeEntityAbstract

  def initialize(*arg)
    super(*arg)
    self.downloadable = true
  end

  def downloadable?
    return false unless plain_file
    dir = self
    while (dir)
      return false unless dir.downloadable
      dir = dir.parent
      dir = dir && dir.entity
    end
    return true
  end

end
