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 | |
| 8 | PyAPI_FUNC(wchar_t *) _Py_char2wchar( |
Victor Stinner | 168e117 | 2010-10-16 23:16:16 +0000 | [diff] [blame] | 9 | const char *arg, |
| 10 | size_t *size); |
Victor Stinner | 4e31443 | 2010-10-07 21:45:39 +0000 | [diff] [blame] | 11 | |
| 12 | PyAPI_FUNC(char*) _Py_wchar2char( |
| 13 | const wchar_t *text); |
| 14 | |
Victor Stinner | b306d75 | 2010-10-07 22:09:40 +0000 | [diff] [blame] | 15 | #if defined(HAVE_STAT) && !defined(MS_WINDOWS) |
Victor Stinner | 4e31443 | 2010-10-07 21:45:39 +0000 | [diff] [blame] | 16 | PyAPI_FUNC(int) _Py_wstat( |
| 17 | const wchar_t* path, |
| 18 | struct stat *buf); |
| 19 | #endif |
| 20 | |
| 21 | #ifdef HAVE_STAT |
| 22 | PyAPI_FUNC(int) _Py_stat( |
Victor Stinner | a4a7595 | 2010-10-07 22:23:10 +0000 | [diff] [blame] | 23 | PyObject *path, |
Victor Stinner | 4e31443 | 2010-10-07 21:45:39 +0000 | [diff] [blame] | 24 | struct stat *statbuf); |
| 25 | #endif |
| 26 | |
| 27 | PyAPI_FUNC(FILE *) _Py_wfopen( |
| 28 | const wchar_t *path, |
| 29 | const wchar_t *mode); |
| 30 | |
| 31 | PyAPI_FUNC(FILE*) _Py_fopen( |
Victor Stinner | a4a7595 | 2010-10-07 22:23:10 +0000 | [diff] [blame] | 32 | PyObject *path, |
Victor Stinner | 4e31443 | 2010-10-07 21:45:39 +0000 | [diff] [blame] | 33 | const char *mode); |
| 34 | |
| 35 | #ifdef HAVE_READLINK |
| 36 | PyAPI_FUNC(int) _Py_wreadlink( |
| 37 | const wchar_t *path, |
| 38 | wchar_t *buf, |
| 39 | size_t bufsiz); |
| 40 | #endif |
| 41 | |
| 42 | #ifdef HAVE_REALPATH |
| 43 | PyAPI_FUNC(wchar_t*) _Py_wrealpath( |
| 44 | const wchar_t *path, |
Victor Stinner | 015f4d8 | 2010-10-07 22:29:53 +0000 | [diff] [blame] | 45 | wchar_t *resolved_path, |
| 46 | size_t resolved_path_size); |
Victor Stinner | 4e31443 | 2010-10-07 21:45:39 +0000 | [diff] [blame] | 47 | #endif |
| 48 | |
| 49 | PyAPI_FUNC(wchar_t*) _Py_wgetcwd( |
| 50 | wchar_t *buf, |
| 51 | size_t size); |
| 52 | |
| 53 | #ifdef __cplusplus |
| 54 | } |
| 55 | #endif |
| 56 | |
| 57 | #endif /* !Py_FILEUTILS_H */ |