method

children

Importance_1
v2_5_5 - Show latest stable - 0 notes - Class: Dir
children(*args) public

Returns an array containing all of the filenames except for “.” and “..” in the given directory. Will raise a SystemCallError if the named directory doesn’t exist.

The optional encoding keyword argument specifies the encoding of the directory. If not specified, the filesystem encoding is used.

Dir.children("testdir")   #=> ["config.h", "main.rb"]
Show source
Register or log in to add new notes.