module Blogdown class FilePipeline # THis keeps track of files being processed attr_accessor :stack def initialize(root) @root=root @base=Pathname(@root) @stack=[] load_files end # @return [Array] The files under posts folder def load_files puts "loading files from #{@root.to_s}" base_input=@root base=Pathname.new(base_input) unless base.exist? raise Blogdown::Exceptions::DirectoryNotFound, "please make sure the posts folder is present" end if base.exist? base.each_child do|child| puts "loading #{child.to_s}" self.stack<e raise e end end end end