Checking multiple files and specifying options

While the kav_check_file is adequate for basic file checking, you can use the following more elaborate function to check several files at once and/or pass KAVDaemon options.

int kav_check_files(kav_ctx ctx, int count, const char **pathnames, const char *options);

The kav_check_files function is similar to kav_check_file. It uses the session context ctx to check count files or directories, whose names are given by the array pathnames, at once. Additionally, you can pass any of kavscanner command-line options to KAVDaemon to modify its behavior. To do so, specify the necessary options in options parameter (without the leading dash); when providing several options separate them with | character. For the description of available options, see the kavscanner manpage. For example, to ensure that attachments in mailbox files are checked, use MP option. The result of the check is recorded in the context and can be retrieved using the functions described in the section called “Interpreting check results”.

The meaning of the kav_check_files's return value and the errors that this funcion may generate are the same as those of kav_check_files. See the section called “Checking files” for the description of these errors.