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