# File lib/sprockets/directive_processor.rb, line 258
      def process_require_directory_directive(path = ".")
        if relative?(path)
          root = pathname.dirname.join(path).expand_path

          unless (stats = stat(root)) && stats.directory?
            raise ArgumentError, "require_tree argument must be a directory"
          end

          context.depend_on(root)

          entries(root).each do |pathname|
            pathname = root.join(pathname)
            if pathname.to_s == self.file
              next
            elsif context.asset_requirable?(pathname)
              context.require_asset(pathname)
            end
          end
        else
          # The path must be relative and start with a `./`.
          raise ArgumentError, "require_directory argument must be a relative path"
        end
      end