Method: Path#entries

Defined in:
lib/path/dir.rb

#entriesObject

Deprecated.

Use #children instead. This method is deprecated since it is too low level and likely useless in Ruby. But it is there for the sake of compatibility with Dir.entries (and Pathname#entries).

Return the entries (files and subdirectories) in the directory. Each Path only contains the filename. The result may contain the current directory #<Path .> and the parent directory #<Path ..>.

Path('/usr/local').entries
# => [#<Path share>, #<Path lib>, #<Path .>, #<Path ..>, <Path bin>, ...]


88
89
90
# File 'lib/path/dir.rb', line 88

def entries
  Dir.entries(@path).map(&Path)
end