Debian Codegraph @

madrisan-nagios-plugins-linux/nagios-plugins-linux/include/files.h

raw symbols SCIP
1 // SPDX-License-Identifier: GPL-3.0-or-later
2 /* files.h -- Linux Pressure Stall Information (PSI) parser
3
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 3 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */
16
17 #ifndef _FILES_H_
18 #define _FILES_H_
19
20 #ifdef __cplusplus
21 extern "C"
22 {
23 #endif
24
25 enum
26 {
27 FILES_DEFAULT = 0,
28 FILES_DIRECTORIES_ONLY = (1 << 0),
29 FILES_IGNORE_SYMLINKS = (1 << 1),
30 FILES_IGNORE_UNKNOWN = (1 << 2),
31 FILES_INCLUDE_HIDDEN = (1 << 3),
32 FILES_RECURSIVE = (1 << 4),
33 FILES_REGULAR_ONLY = (1 << 5)
34 };
35
36 struct files_types
37 {
38 int64_t directory;
39 int64_t hidden;
40 /* block/character device, named fifo, socket */
41 int64_t special_file;
42 int64_t symlink;
43 int64_t regular_file;
44 int64_t total;
45 int64_t unknown;
46 };
47
48 int files_filecount (const char *dir, unsigned int flags,
49 int64_t age, int64_t size, const char *pattern,
50 struct files_types **filecount);
51
52 #ifdef __cplusplus
53 }
54 #endif
55
56 #endif /* files.h */