file_r->content = p + 1;
}
+bool settings_file_has_path(const char *value)
+{
+ /* value must be in <path><LF><content> format */
+ const char *p = strchr(value, '\n');
+ if (p == NULL)
+ i_panic("Settings file value is missing LF");
+ return p != value;
+}
+
const char *settings_file_get_value(pool_t pool,
const struct settings_file *file)
{
the path_pool, while content points directly to the value string. */
void settings_file_get(const char *value, pool_t path_pool,
struct settings_file *file_r);
+/* Returns TRUE if the settings value contains a non-empty path. The value
+ is expected to be in the SET_FILE format (path LF content). */
+bool settings_file_has_path(const char *value);
/* Convert settings_file into a value (path LF content). The file path may be
NULL, but the content must exist. */
const char *settings_file_get_value(pool_t pool,