Checks if files have the specified file type. Returns filenames of files that mismatch the file type specified with an option to delete them.
util_check_file_type( dir = getwd(), fn, file_type = "PDF document", remove_files = FALSE, par = TRUE, ncores = NULL )
dir | Character string. Directory which contains target files. |
---|---|
fn | Character vector. Filenames. |
file_type | Character string. File type. For example, "PDF document" for PDF and "EPUB document" for EPUB. |
remove_files | Logical. Remove files that do not match the specified file type. BE CAREFUL WITH THIS OPTION AS FILES CAN BE DELETED FROM YOUR SYSTEM. |
par | Logical.
If |
ncores | Integer.
Number of cores to use if |
Ivan Jacob Agaloos Pesigan