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