Add config_file_exists

This commit is contained in:
twinaphex 2016-09-18 21:55:53 +02:00
parent 6544b0bcd7
commit d25cace9ed
2 changed files with 11 additions and 0 deletions

View File

@ -948,3 +948,12 @@ bool config_get_entry_list_next(struct config_file_entry *entry)
return true;
}
bool config_file_exists(const char *path)
{
config_file_t *config = config_file_new(path);
if (!config)
return false;
config_file_free(config);
return true;
}

View File

@ -158,6 +158,8 @@ bool config_file_write(config_file_t *conf, const char *path);
* Does not close the file. */
void config_file_dump(config_file_t *conf, FILE *file);
bool config_file_exists(const char *path);
RETRO_END_DECLS
#endif