instance method
Pathname#each_entry
() { (::Pathname) -> untyped } -> nil
each_entry() { |pathname| ... }
pathname_builtin.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/pathname_builtin.rb, line 1133
def each_entry(&block) # :yield: pathname
return to_enum(__method__) unless block_given?
Dir.foreach(@path) {|f| yield self.class.new(f) }
end
Iterates over the entries (files and subdirectories) in the directory. It yields a Pathname object for each entry.
This method has existed since 1.8.1.