flush
[m6w6/ext-psi] / psi.d / glob.psi
1 function psi\glob(string $pattern, int $flags, array &$glob = NULL) : int {
2 let path = strval($pattern);
3 let flags = intval($flags);
4 let err = NULL;
5 let buf = &arrval($glob);
6 return to_int(glob);
7 set $glob = to_array(*buf,
8 to_int(gl_matchc),
9 to_int(gl_pathc),
10 to_int(gl_offs),
11 to_int(gl_flags),
12 to_array(gl_pathv, gl_pathc + gl_offs, to_string(gl_pathv))
13 );
14 free globfree(buf);
15 }