| 1 | // SPDX-License-Identifier: GPL-3.0-or-later |
| 2 | |
| 3 | #ifndef NETDATA_PATHS_H |
| 4 | #define NETDATA_PATHS_H |
| 5 | |
| 6 | #include "../libnetdata.h" |
| 7 | |
| 8 | size_t filename_from_path_entry(char out[FILENAME_MAX], const char *path, const char *entry, const char *extension); |
| 9 | char *filename_from_path_entry_strdupz(const char *path, const char *entry); |
| 10 | |
| 11 | bool filename_is_file(const char *filename); |
| 12 | bool filename_is_dir(const char *filename, bool create_it); |
| 13 | |
| 14 | bool path_entry_is_file(const char *path, const char *entry); |
| 15 | bool path_entry_is_dir(const char *path, const char *entry, bool create_it); |
| 16 | |
| 17 | void recursive_config_double_dir_load( |
| 18 | const char *user_path |
| 19 | , const char *stock_path |
| 20 | , const char *entry |
| 21 | , int (*callback)(const char *filename, void *data, bool stock_config) |
| 22 | , void *data |
| 23 | , size_t depth |
| 24 | ); |
| 25 | |
| 26 | #endif //NETDATA_PATHS_H |