edelib  2.1.0
FileTest.h
1 /*
2  * $Id: FileTest.h 2839 2009-09-28 11:36:20Z karijes $
3  *
4  * File info facility
5  * Copyright (c) 2009 edelib authors
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public License
18  * along with this library. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef __EDELIB_FILETEST_H__
22 #define __EDELIB_FILETEST_H__
23 
24 #include "edelib-global.h"
25 
26 EDELIB_NS_BEGIN
27 
32 typedef enum {
34  FILE_TEST_IS_DIR = 1 << 1,
36  FILE_TEST_IS_CHAR = 1 << 3,
37  FILE_TEST_IS_BLOCK = 1 << 4,
38  FILE_TEST_IS_FIFO = 1 << 5,
43  FILE_TEST_EXISTS = 1 << 10
44 } FileTestFlags;
45 
60 EDELIB_API bool file_test(const char* path, unsigned int flags);
61 
62 EDELIB_NS_END
63 #endif
character device
Definition: FileTest.h:36
exists, no matter what type
Definition: FileTest.h:43
block device
Definition: FileTest.h:37
executable
Definition: FileTest.h:42
writeable
Definition: FileTest.h:41
readable
Definition: FileTest.h:40
FIFO (pipes)
Definition: FileTest.h:38
symbolic link
Definition: FileTest.h:35
directory
Definition: FileTest.h:34
file
Definition: FileTest.h:33
socket
Definition: FileTest.h:39