Victor Stinner | 4e31443 | 2010-10-07 21:45:39 +0000 | [diff] [blame] | 1 | #ifndef Py_FILEUTILS_H |
| 2 | #define Py_FILEUTILS_H |
| 3 | |
| 4 | #ifdef __cplusplus |
| 5 | extern "C" { |
| 6 | #endif |
| 7 | |
Brett Cannon | efb00c0 | 2012-02-29 18:31:31 -0500 | [diff] [blame] | 8 | PyAPI_FUNC(PyObject *) _Py_device_encoding(int); |
| 9 | |
Victor Stinner | 4e31443 | 2010-10-07 21:45:39 +0000 | [diff] [blame] | 10 | PyAPI_FUNC(wchar_t *) _Py_char2wchar( |
Victor Stinner | 168e117 | 2010-10-16 23:16:16 +0000 | [diff] [blame] | 11 | const char *arg, |
| 12 | size_t *size); |
Victor Stinner | 4e31443 | 2010-10-07 21:45:39 +0000 | [diff] [blame] | 13 | |
| 14 | PyAPI_FUNC(char*) _Py_wchar2char( |
Victor Stinner | 2f02a51 | 2010-11-08 22:43:46 +0000 | [diff] [blame] | 15 | const wchar_t *text, |
| 16 | size_t *error_pos); |
Victor Stinner | 4e31443 | 2010-10-07 21:45:39 +0000 | [diff] [blame] | 17 | |
Victor Stinner | b306d75 | 2010-10-07 22:09:40 +0000 | [diff] [blame] | 18 | #if defined(HAVE_STAT) && !defined(MS_WINDOWS) |
Victor Stinner | 4e31443 | 2010-10-07 21:45:39 +0000 | [diff] [blame] | 19 | PyAPI_FUNC(int) _Py_wstat( |
| 20 | const wchar_t* path, |
| 21 | struct stat *buf); |
| 22 | #endif |
| 23 | |
| 24 | #ifdef HAVE_STAT |
| 25 | PyAPI_FUNC(int) _Py_stat( |
Victor Stinner | a4a7595 | 2010-10-07 22:23:10 +0000 | [diff] [blame] | 26 | PyObject *path, |
Victor Stinner | 4e31443 | 2010-10-07 21:45:39 +0000 | [diff] [blame] | 27 | struct stat *statbuf); |
| 28 | #endif |
| 29 | |
Martin v. Löwis | 1c0689c | 2014-01-03 21:36:49 +0100 | [diff] [blame] | 30 | #ifndef Py_LIMITED_API |
Victor Stinner | daf4555 | 2013-08-28 00:53:59 +0200 | [diff] [blame] | 31 | PyAPI_FUNC(int) _Py_open( |
| 32 | const char *pathname, |
| 33 | int flags); |
Martin v. Löwis | 1c0689c | 2014-01-03 21:36:49 +0100 | [diff] [blame] | 34 | #endif |
Victor Stinner | daf4555 | 2013-08-28 00:53:59 +0200 | [diff] [blame] | 35 | |
Victor Stinner | 4e31443 | 2010-10-07 21:45:39 +0000 | [diff] [blame] | 36 | PyAPI_FUNC(FILE *) _Py_wfopen( |
| 37 | const wchar_t *path, |
| 38 | const wchar_t *mode); |
| 39 | |
| 40 | PyAPI_FUNC(FILE*) _Py_fopen( |
Victor Stinner | daf4555 | 2013-08-28 00:53:59 +0200 | [diff] [blame] | 41 | const char *pathname, |
| 42 | const char *mode); |
| 43 | |
| 44 | PyAPI_FUNC(FILE*) _Py_fopen_obj( |
Victor Stinner | a4a7595 | 2010-10-07 22:23:10 +0000 | [diff] [blame] | 45 | PyObject *path, |
Victor Stinner | 4e31443 | 2010-10-07 21:45:39 +0000 | [diff] [blame] | 46 | const char *mode); |
| 47 | |
| 48 | #ifdef HAVE_READLINK |
| 49 | PyAPI_FUNC(int) _Py_wreadlink( |
| 50 | const wchar_t *path, |
| 51 | wchar_t *buf, |
| 52 | size_t bufsiz); |
| 53 | #endif |
| 54 | |
| 55 | #ifdef HAVE_REALPATH |
| 56 | PyAPI_FUNC(wchar_t*) _Py_wrealpath( |
| 57 | const wchar_t *path, |
Victor Stinner | 015f4d8 | 2010-10-07 22:29:53 +0000 | [diff] [blame] | 58 | wchar_t *resolved_path, |
| 59 | size_t resolved_path_size); |
Victor Stinner | 4e31443 | 2010-10-07 21:45:39 +0000 | [diff] [blame] | 60 | #endif |
| 61 | |
| 62 | PyAPI_FUNC(wchar_t*) _Py_wgetcwd( |
| 63 | wchar_t *buf, |
| 64 | size_t size); |
| 65 | |
Martin v. Löwis | 1c0689c | 2014-01-03 21:36:49 +0100 | [diff] [blame] | 66 | #ifndef Py_LIMITED_API |
Victor Stinner | daf4555 | 2013-08-28 00:53:59 +0200 | [diff] [blame] | 67 | PyAPI_FUNC(int) _Py_get_inheritable(int fd); |
| 68 | |
| 69 | PyAPI_FUNC(int) _Py_set_inheritable(int fd, int inheritable, |
| 70 | int *atomic_flag_works); |
| 71 | |
| 72 | PyAPI_FUNC(int) _Py_dup(int fd); |
Martin v. Löwis | 1c0689c | 2014-01-03 21:36:49 +0100 | [diff] [blame] | 73 | #endif |
Victor Stinner | daf4555 | 2013-08-28 00:53:59 +0200 | [diff] [blame] | 74 | |
Victor Stinner | 4e31443 | 2010-10-07 21:45:39 +0000 | [diff] [blame] | 75 | #ifdef __cplusplus |
| 76 | } |
| 77 | #endif |
| 78 | |
| 79 | #endif /* !Py_FILEUTILS_H */ |