FileHandle.h 674 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #pragma once
  2. #include "il2cpp-config.h"
  3. #if IL2CPP_TARGET_POSIX
  4. #include <string>
  5. #include <sys/stat.h>
  6. #include <sys/types.h>
  7. #include "os/File.h"
  8. #include "os/c-api/OSGlobalEnums.h"
  9. namespace il2cpp
  10. {
  11. namespace os
  12. {
  13. struct FileHandle
  14. {
  15. int fd;
  16. FileType type;
  17. std::string path;
  18. int options;
  19. int shareMode;
  20. int accessMode;
  21. // device and inode are used as key for finding file handles
  22. dev_t device;
  23. ino_t inode;
  24. // Linked list of file handles
  25. FileHandle *prev;
  26. FileHandle *next;
  27. FileHandle() : prev(NULL), next(NULL)
  28. {
  29. }
  30. };
  31. }
  32. }
  33. #endif