]>
Commit | Line | Data |
---|---|---|
7d50b32a LP |
1 | /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ |
2 | ||
3 | #pragma once | |
4 | ||
5 | /*** | |
6 | This file is part of systemd. | |
7 | ||
8 | Copyright 2010 Lennart Poettering | |
9 | ||
10 | systemd is free software; you can redistribute it and/or modify it | |
11 | under the terms of the GNU Lesser General Public License as published by | |
12 | the Free Software Foundation; either version 2.1 of the License, or | |
13 | (at your option) any later version. | |
14 | ||
15 | systemd is distributed in the hope that it will be useful, but | |
16 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
18 | Lesser General Public License for more details. | |
19 | ||
20 | You should have received a copy of the GNU Lesser General Public License | |
21 | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
22 | ***/ | |
23 | ||
24 | #include <string.h> | |
25 | ||
26 | #include "macro.h" | |
b11d6a7b | 27 | #include "string-util.h" |
7d50b32a LP |
28 | |
29 | int glob_exists(const char *path); | |
30 | int glob_extend(char ***strv, const char *path); | |
31 | ||
32 | #define _cleanup_globfree_ _cleanup_(globfree) | |
33 | ||
34 | _pure_ static inline bool string_is_glob(const char *p) { | |
35 | /* Check if a string contains any glob patterns. */ | |
36 | return !!strpbrk(p, GLOB_CHARS); | |
37 | } |