fileutil.h 985 B

123456789101112131415161718192021222324252627282930
  1. // fileutil.h :
  2. //
  3. #if !defined(AGD_FILEUTIL_H__35BFEDA3_B89A_4431_B376_4E96713D12C2__INCLUDED_)
  4. #define AGD_FILEUTIL_H__35BFEDA3_B89A_4431_B376_4E96713D12C2__INCLUDED_
  5. #include <stdio.h>
  6. #include <sys/stat.h>
  7. #include <linux/limits.h>
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif // __cplusplus
  11. /////////////////////////////////////////////////////////////////////////////
  12. // fileutil.h - Declarations:
  13. size_t GetFileSize(FILE *fd);
  14. int FileExist(const char *file);
  15. int DirectoryExist(const char *dir);
  16. int CreateDirectory(const char *pszDir);
  17. const char* GetAppPath(char *pszPath, size_t nCChPath);
  18. const char* GetAppDirectory(char *pszDir, size_t nCChDir);
  19. const char* BuildCanonicalFilePath(const char *pszDir, const char *pszFilespec, char *pszPath, size_t nCChPath);
  20. /////////////////////////////////////////////////////////////////////////////
  21. #ifdef __cplusplus
  22. }
  23. #endif // __cplusplus
  24. #endif // !defined(AGD_FILEUTIL_H__35BFEDA3_B89A_4431_B376_4E96713D12C2__INCLUDED_)