00001 /*************************************************************************** 00002 *cr 00003 *cr (C) Copyright 1995-2019 The Board of Trustees of the 00004 *cr University of Illinois 00005 *cr All Rights Reserved 00006 *cr 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * RCS INFORMATION: 00011 * 00012 * $RCSfile: VMDDir.h,v $ 00013 * $Author: johns $ $Locker: $ $State: Exp $ 00014 * $Revision: 1.14 $ $Date: 2019/01/17 21:21:02 $ 00015 * 00016 *************************************************************************** 00017 * DESCRIPTION: 00018 * Low level platform-specific code for scanning/querying directories. 00019 ***************************************************************************/ 00020 00021 #include <stdio.h> 00022 00023 #if defined(_MSC_VER) 00024 #include <windows.h> 00025 00027 typedef struct { 00028 HANDLE h; 00029 WIN32_FIND_DATA fd; 00030 } VMDDIR; 00031 00032 #else 00033 #include <dirent.h> 00034 00036 typedef struct { 00037 DIR * d; 00038 } VMDDIR; 00039 #endif 00040 00041 00042 VMDDIR * vmd_opendir(const char *); 00043 char * vmd_readdir(VMDDIR *); 00044 void vmd_closedir(VMDDIR *); 00045 int vmd_file_is_executable(const char * filename);