The C Utility Toolkit
Main Page | Data Structures | File List | Data Fields | Globals

dir.h

Go to the documentation of this file.
00001 /* 00002 ** This file is part of the C Utility Toolkit (CUTK) 00003 ** Copyright (C) 2002-2005 Chris Osgood 00004 ** http://www.cutk.org 00005 ** 00006 ** This library is free software; you can redistribute it and/or 00007 ** modify it under the terms of the GNU Lesser General Public 00008 ** License as published by the Free Software Foundation; either 00009 ** version 2.1 of the License, or (at your option) any later version. 00010 ** 00011 ** This library is distributed in the hope that it will be useful, 00012 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 ** Lesser General Public License for more details. 00015 ** 00016 ** You should have received a copy of the GNU Lesser General Public 00017 ** License along with this library; if not, write to the Free Software 00018 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 ** 00020 ** Please report all bugs and problems to "bugs at cutk.org". 00021 */ 00022 00023 /* 00024 ** $Id: dir.h 21 2005-01-12 04:28:32Z chris $ 00025 */ 00026 00027 #ifndef __INCLUDE_DIRENT_H__ 00028 #define __INCLUDE_DIRENT_H__ 00029 00030 #ifdef _WIN32 00031 #define WIN32_LEAN_AND_MEAN 00032 #include <windows.h> 00033 #else 00034 #include <dirent.h> 00035 #endif 00036 00037 #ifdef __cplusplus 00038 extern "C" { 00039 #endif 00040 00041 void CleanPath(char* path); 00042 00043 #ifdef _WIN32 00044 00045 #define DT_DIR 4 00046 00047 struct dirent 00048 { 00049 unsigned char d_type; 00050 char d_name[MAX_PATH]; /* Filename */ 00051 }; 00052 00053 typedef struct 00054 { 00055 HANDLE handle; 00056 WIN32_FIND_DATA data; 00057 struct dirent entry; 00058 char once; 00059 } DIR; 00060 00061 DIR* opendir(const char* name); 00062 struct dirent* readdir(DIR* dir); 00063 int closedir(DIR* dir); 00064 #endif /* _WIN32 */ 00065 00066 #ifdef __cplusplus 00067 } 00068 #endif 00069 00070 #endif /* __INCLUDE_DIRENT_H__ */

Generated on Wed Jan 12 13:13:42 2005 for CUTK by doxygen 1.3.7