function psi\glob(string $pattern, int $flags, array &$glob = NULL, callable $errfn = NULL) : int {
let path = strval($pattern);
let flags = intval($flags);
function psi\glob(string $pattern, int $flags, array &$glob = NULL, callable $errfn = NULL) : int {
let path = strval($pattern);
let flags = intval($flags);
- let buf = &arrval($glob);
- return to_int(glob);
+ let buf = &arrval($glob,
+ intval($gl_matchc),
+ intval($gl_pathc),
+ intval($gl_offs),
+ intval($gl_flags),
+ &arrval($gl_pathv,
+ strval($gl_pathv)
+ )
+ );
+ return glob(path, flags, err, buf) as to_int(glob);