chiark / gitweb /
78d03e6e0d9efbe5e375bc676ae2e327bc5affd4
[elogind.git] / src / basic / conf-files.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #pragma once
3
4 /***
5   This file is part of systemd.
6
7   Copyright 2010-2012 Lennart Poettering
8   Copyright 2010-2012 Kay Sievers
9 ***/
10
11 enum {
12         CONF_FILES_EXECUTABLE    = 1U << 0,
13         CONF_FILES_REGULAR       = 1U << 1,
14         CONF_FILES_DIRECTORY     = 1U << 2,
15         CONF_FILES_BASENAME      = 1U << 3,
16         CONF_FILES_FILTER_MASKED = 1U << 4,
17 };
18
19 int conf_files_list(char ***ret, const char *suffix, const char *root, unsigned flags, const char *dir, ...);
20 int conf_files_list_strv(char ***ret, const char *suffix, const char *root, unsigned flags, const char* const* dirs);
21 int conf_files_list_nulstr(char ***ret, const char *suffix, const char *root, unsigned flags, const char *dirs);
22 int conf_files_insert(char ***strv, const char *root, char **dirs, const char *path);
23 int conf_files_insert_nulstr(char ***strv, const char *root, const char *dirs, const char *path);
24 int conf_files_list_with_replacement(
25                 const char *root,
26                 char **config_dirs,
27                 const char *replacement,
28                 char ***files,
29                 char **replace_file);
30 int conf_files_cat(const char *root, const char *name);