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 | |
Victor Stinner | daf4555 | 2013-08-28 00:53:59 +0200 | [diff] [blame] | 30 | PyAPI_FUNC(int) _Py_open( |
| 31 | const char *pathname, |
| 32 | int flags); |
| 33 | |
Victor Stinner | 4e31443 | 2010-10-07 21:45:39 +0000 | [diff] [blame] | 34 | PyAPI_FUNC(FILE *) _Py_wfopen( |
| 35 | const wchar_t *path, |
| 36 | const wchar_t *mode); |
| 37 | |
| 38 | PyAPI_FUNC(FILE*) _Py_fopen( |
Victor Stinner | daf4555 | 2013-08-28 00:53:59 +0200 | [diff] [blame] | 39 | const char *pathname, |
| 40 | const char *mode); |
| 41 | |
| 42 | PyAPI_FUNC(FILE*) _Py_fopen_obj( |
Victor Stinner | a4a7595 | 2010-10-07 22:23:10 +0000 | [diff] [blame] | 43 | PyObject *path, |
Victor Stinner | 4e31443 | 2010-10-07 21:45:39 +0000 | [diff] [blame] | 44 | const char *mode); |
| 45 | |
| 46 | #ifdef HAVE_READLINK |
| 47 | PyAPI_FUNC(int) _Py_wreadlink( |
| 48 | const wchar_t *path, |
| 49 | wchar_t *buf, |
| 50 | size_t bufsiz); |
| 51 | #endif |
| 52 | |
| 53 | #ifdef HAVE_REALPATH |
| 54 | PyAPI_FUNC(wchar_t*) _Py_wrealpath( |
| 55 | const wchar_t *path, |
Victor Stinner | 015f4d8 | 2010-10-07 22:29:53 +0000 | [diff] [blame] | 56 | wchar_t *resolved_path, |
| 57 | size_t resolved_path_size); |
Victor Stinner | 4e31443 | 2010-10-07 21:45:39 +0000 | [diff] [blame] | 58 | #endif |
| 59 | |
| 60 | PyAPI_FUNC(wchar_t*) _Py_wgetcwd( |
| 61 | wchar_t *buf, |
| 62 | size_t size); |
| 63 | |
Victor Stinner | daf4555 | 2013-08-28 00:53:59 +0200 | [diff] [blame] | 64 | PyAPI_FUNC(int) _Py_get_inheritable(int fd); |
| 65 | |
| 66 | PyAPI_FUNC(int) _Py_set_inheritable(int fd, int inheritable, |
| 67 | int *atomic_flag_works); |
| 68 | |
| 69 | PyAPI_FUNC(int) _Py_dup(int fd); |
| 70 | |
Victor Stinner | 4e31443 | 2010-10-07 21:45:39 +0000 | [diff] [blame] | 71 | #ifdef __cplusplus |
| 72 | } |
| 73 | #endif |
| 74 | |
| 75 | #endif /* !Py_FILEUTILS_H */ |