Skip to content
instance method

Dir#read

() -> ::String?
read → string or nil

Reads and returns the next entry name from self; returns nil if at end-of-stream; see Dir As Stream-Like:

Example
dir = Dir.new('example')
dir.read # => "."
dir.read # => ".."
dir.read # => "config.h"
See also #pos= #rewind #pos #seek also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0