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