# File lib/fakefs/pathname.rb, line 528 def children(with_directory = true) with_directory = false if @path == '.' result = [] Dir.foreach(@path) do |e| next if e == '.' || e == '..' result << if with_directory self.class.new(File.join(@path, e)) else self.class.new(e) end end result end