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.

79 lines
1.5 KiB

  1. #ifndef Py_FILEUTILS_H
  2. #define Py_FILEUTILS_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. PyAPI_FUNC(PyObject *) _Py_device_encoding(int);
  7. PyAPI_FUNC(wchar_t *) _Py_char2wchar(
  8. const char *arg,
  9. size_t *size);
  10. PyAPI_FUNC(char*) _Py_wchar2char(
  11. const wchar_t *text,
  12. size_t *error_pos);
  13. #if defined(HAVE_STAT) && !defined(MS_WINDOWS)
  14. PyAPI_FUNC(int) _Py_wstat(
  15. const wchar_t* path,
  16. struct stat *buf);
  17. #endif
  18. #ifdef HAVE_STAT
  19. PyAPI_FUNC(int) _Py_stat(
  20. PyObject *path,
  21. struct stat *statbuf);
  22. #endif
  23. #ifndef Py_LIMITED_API
  24. PyAPI_FUNC(int) _Py_open(
  25. const char *pathname,
  26. int flags);
  27. #endif
  28. PyAPI_FUNC(FILE *) _Py_wfopen(
  29. const wchar_t *path,
  30. const wchar_t *mode);
  31. PyAPI_FUNC(FILE*) _Py_fopen(
  32. const char *pathname,
  33. const char *mode);
  34. PyAPI_FUNC(FILE*) _Py_fopen_obj(
  35. PyObject *path,
  36. const char *mode);
  37. #ifdef HAVE_READLINK
  38. PyAPI_FUNC(int) _Py_wreadlink(
  39. const wchar_t *path,
  40. wchar_t *buf,
  41. size_t bufsiz);
  42. #endif
  43. #ifdef HAVE_REALPATH
  44. PyAPI_FUNC(wchar_t*) _Py_wrealpath(
  45. const wchar_t *path,
  46. wchar_t *resolved_path,
  47. size_t resolved_path_size);
  48. #endif
  49. PyAPI_FUNC(wchar_t*) _Py_wgetcwd(
  50. wchar_t *buf,
  51. size_t size);
  52. #ifndef Py_LIMITED_API
  53. PyAPI_FUNC(int) _Py_get_inheritable(int fd);
  54. PyAPI_FUNC(int) _Py_set_inheritable(int fd, int inheritable,
  55. int *atomic_flag_works);
  56. PyAPI_FUNC(int) _Py_dup(int fd);
  57. #endif
  58. #ifdef __cplusplus
  59. }
  60. #endif
  61. #endif /* !Py_FILEUTILS_H */