3 * Copyright (C) 2009 Tomas 'ZeXx86' Jedrzejek (zexx86@zexos.org)
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #include <sys/types.h>
38 #define S_IFMT 00170000
39 #define S_IFREG 0100000
40 #define S_IFBLK 0060000
41 #define S_IFDIR 0040000
42 #define S_IFCHR 0020000
43 #define S_IFIFO 0010000
44 #define S_ISUID 0004000
45 #define S_ISGID 0002000
46 #define S_ISVTX 0001000
63 #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
64 #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
65 #define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
66 #define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
67 #define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
69 extern int chmod (const char *path
, mode_t mode
);
70 extern int fstat (int fd
, struct stat
*stat_buf
);
71 extern int mkdir (const char *pathname
, mode_t mode
);
72 extern int rmdir (const char *pathname
);
73 extern int mkfifo (const char *path
, mode_t mode
);
74 extern int creat (const char *pathname
, mode_t mode
);
75 extern mode_t
umask (mode_t mask
);
76 extern int stat (const char *path
, struct stat
*buf
);
77 extern int lstat (const char *path
, struct stat
*buf
);
78 extern mode_t
umask (mode_t mask
);
79 extern int chmod (const char *path
, mode_t mode
);