Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.1 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef LINUX_SUPPORT_H
  8. #define LINUX_SUPPORT_H
  9. #include <ctype.h> // tolower()
  10. #include <limits.h> // PATH_MAX define
  11. #include <string.h> //strcmp, strcpy
  12. #include <sys/stat.h> // stat()
  13. #include <unistd.h>
  14. #include <dirent.h> // scandir()
  15. #include <stdlib.h>
  16. #include <stdio.h>
  17. #include "tier0/platform.h"
  18. #define FILE_ATTRIBUTE_DIRECTORY S_IFDIR
  19. typedef struct
  20. {
  21. // public data
  22. int dwFileAttributes;
  23. char cFileName[PATH_MAX]; // the file name returned from the call
  24. char cBaseDir[PATH_MAX]; // the root dir for this find
  25. int numMatches;
  26. struct dirent **namelist;
  27. } FIND_DATA;
  28. #define WIN32_FIND_DATA FIND_DATA
  29. HANDLE FindFirstFile( const char *findName, FIND_DATA *dat);
  30. bool FindNextFile(HANDLE handle, FIND_DATA *dat);
  31. bool FindClose(HANDLE handle);
  32. const char *findFileInDirCaseInsensitive(const char* path, char *file);
  33. #endif // LINUX_SUPPORT_H