Method: Dir#children

Defined in:
dir.c

#childrenArray

Returns an array of the entry names in self except for '.' and '..':

dir = Dir.new('/example')
dir.children # => ["config.h", "lib", "main.rb"]

Returns:



3568
3569
3570
3571
3572
3573
3574
# File 'dir.c', line 3568

static VALUE
dir_collect_children(VALUE dir)
{
    VALUE ary = rb_ary_new();
    dir_each_entry(dir, rb_ary_push, ary, TRUE);
    return ary;
}