Moved Dir.children from Ruby to C implementation to eliminate
Ruby loop overhead and string comparison inefficiencies.
Uses existing skip_name_p helper to filter out "." and ".." entries
efficiently in C.
Co-authored-by: Claude <noreply@anthropic.com>
Moved Dir.entries from Ruby to C implementation to eliminate
Ruby loop overhead and array allocation inefficiencies.
Builds result array directly in C for better performance.
Co-authored-by: Claude <noreply@anthropic.com>
Added complete call-seq documentation for directory operations across
both mrblib/dir.rb (7 Ruby methods) and src/dir.c (12 C methods):
## Ruby Methods (mrblib/dir.rb):
- Dir instance methods: each, each_child for directory iteration with
enumerator support when no block given
- Dir class methods: entries, children for getting directory contents
as arrays, foreach for iteration, open for directory access with
optional block handling, chdir for changing working directory with
optional block for temporary changes
## C Methods (src/dir.c):
- Dir class methods: delete for removing directories, exist? for checking
directory existence, getwd/pwd for current directory, mkdir for creating
directories with optional permissions, chroot for changing filesystem root,
empty? for checking if directory is empty
- Dir instance methods: new for creating directory objects, close for
closing directory streams, read for reading directory entries, rewind
for repositioning to beginning, seek/tell/pos for directory positioning
Co-authored-by: Atlassian Rovo Dev