edelib 2.0.0
|
00001 /* 00002 * $Id: FileTest.h 2839 2009-09-28 11:36:20Z karijes $ 00003 * 00004 * File info facility 00005 * Copyright (c) 2009 edelib authors 00006 * 00007 * This library is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU Lesser General Public 00009 * License as published by the Free Software Foundation; either 00010 * version 2 of the License, or (at your option) any later version. 00011 * 00012 * This library is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 * Lesser General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU Lesser General Public License 00018 * along with this library. If not, see <http://www.gnu.org/licenses/>. 00019 */ 00020 00021 #ifndef __EDELIB_FILETEST_H__ 00022 #define __EDELIB_FILETEST_H__ 00023 00024 #include "edelib-global.h" 00025 00026 EDELIB_NS_BEGIN 00027 00032 typedef enum { 00033 FILE_TEST_IS_REGULAR = 1 << 0, 00034 FILE_TEST_IS_DIR = 1 << 1, 00035 FILE_TEST_IS_SYMLINK = 1 << 2, 00036 FILE_TEST_IS_CHAR = 1 << 3, 00037 FILE_TEST_IS_BLOCK = 1 << 4, 00038 FILE_TEST_IS_FIFO = 1 << 5, 00039 FILE_TEST_IS_SOCKET = 1 << 6, 00040 FILE_TEST_IS_READABLE = 1 << 7, 00041 FILE_TEST_IS_WRITEABLE = 1 << 8, 00042 FILE_TEST_IS_EXECUTABLE = 1 << 9, 00043 FILE_TEST_EXISTS = 1 << 10 00044 } FileTestFlags; 00045 00060 EDELIB_API bool file_test(const char* path, unsigned int flags); 00061 00062 EDELIB_NS_END 00063 #endif