Function ruby_glob

Source
pub unsafe extern "C" fn ruby_glob(
    pattern: *const c_char,
    flags: c_int,
    func: ruby_glob_func,
    arg: VALUE,
) -> c_int
Expand description

Identical to rb_glob, except it returns opaque exception states instead of raising exceptions.

@param[in] pattern A glob pattern. @param[in] flags No, you are not allowed to use this. Just pass 0. @param[in] func A callback function. @param[in] arg Extra argument passed to func. @return Return value of func.

@internal

This function is completely broken by design… Not only is there no sane way to pass flags, but there also is no sane way to know what a return value is meant to be.

Though not a part of our public API, and @shyouhei thinks it’s a failure not to be a public API, the flags can be FNM_EXTGLOB, FNM_DOTMATCH etc. Look at dir.c for the list.

§Though not a part of our public API, the return value is in fact an enum ruby_tag_type. You can see the potential values by looking at vm_core.h.

Generated by rb-sys for Ruby mri-x86_64-linux-gnu-3.2.3