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