Name: filter_array - filtered search through an array Syntax: mixed *filter_array(mixed *arr, string fun, object ob, mixed extra) Description: The filter_array efun returns an array holding the items of 'arr' filtered through 'ob->fun()'. The function 'fun' in 'ob is called for each element in 'arr' with that element as parameter. A second parameter 'extra' is sent in each call if given. If 'ob->fun(arr[.index.], extra)' returns 1, the element is included in the returned array. Return value: As described above. If 'arr' is not an array, 0 will be returned. Examples: Get all files from a dir that are readable and are real files: check_dir() { dir=get_dir("/text/*"); dir=filter_array(dir, "check_file", this_object()); } check_file(str) { if (file_size(str)>0) return 1; } See also: efun/member_array, efun/sort_array