1CDIST-TYPE__CLEAN_PATH(7) cdist CDIST-TYPE__CLEAN_PATH(7)
2
3
4
6 cdist-type__clean_path - Remove files and directories which match the
7 pattern.
8
10 Remove files and directories which match the pattern.
11
12 Provided path must be a directory.
13
14 Patterns are passed to find's -regex - see find(1) for more details.
15
16 Look up of files and directories is non-recursive (-maxdepth 1).
17
18 Parent directory is excluded (-mindepth 1).
19
20 This type is not POSIX compatible (sorry, Solaris users).
21
23 pattern
24 Pattern of files which are removed from path.
25
27 path Path which will be cleaned. Defaults to $__object_id.
28
29 exclude
30 Pattern of files which are excluded from removal.
31
32 onchange
33 The code to run if files or directories were removed.
34
36 __clean_path /etc/apache2/conf-enabled \
37 --pattern '.+' \
38 --exclude '.+\(charset\.conf\|security\.conf\)' \
39 --onchange 'service apache2 restart'
40
41 __clean_path apache2-conf-enabled \
42 --path /etc/apache2/conf-enabled \
43 --pattern '.+' \
44 --exclude '.+\(charset\.conf\|security\.conf\)' \
45 --onchange 'service apache2 restart'
46
48 Ander Punnar <ander-at-kvlt-dot-ee>
49
51 Copyright (C) 2019 Ander Punnar. You can redistribute it and/or modify
52 it under the terms of the GNU General Public License as published by
53 the Free Software Foundation, either version 3 of the License, or (at
54 your option) any later version.
55
57 ungleich GmbH 2021
58
59
60
61
627.0.0 Jul 31, 2022 CDIST-TYPE__CLEAN_PATH(7)