blob: 11ebebfba9c877a55be5a35f6eb0ed6b7a14f3de [file] [log] [blame]
Victor Stinner4e314432010-10-07 21:45:39 +00001#ifndef Py_FILEUTILS_H
2#define Py_FILEUTILS_H
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8PyAPI_FUNC(wchar_t *) _Py_char2wchar(
Victor Stinner168e1172010-10-16 23:16:16 +00009 const char *arg,
10 size_t *size);
Victor Stinner4e314432010-10-07 21:45:39 +000011
12PyAPI_FUNC(char*) _Py_wchar2char(
13 const wchar_t *text);
14
Victor Stinnerb306d752010-10-07 22:09:40 +000015#if defined(HAVE_STAT) && !defined(MS_WINDOWS)
Victor Stinner4e314432010-10-07 21:45:39 +000016PyAPI_FUNC(int) _Py_wstat(
17 const wchar_t* path,
18 struct stat *buf);
19#endif
20
21#ifdef HAVE_STAT
22PyAPI_FUNC(int) _Py_stat(
Victor Stinnera4a75952010-10-07 22:23:10 +000023 PyObject *path,
Victor Stinner4e314432010-10-07 21:45:39 +000024 struct stat *statbuf);
25#endif
26
27PyAPI_FUNC(FILE *) _Py_wfopen(
28 const wchar_t *path,
29 const wchar_t *mode);
30
31PyAPI_FUNC(FILE*) _Py_fopen(
Victor Stinnera4a75952010-10-07 22:23:10 +000032 PyObject *path,
Victor Stinner4e314432010-10-07 21:45:39 +000033 const char *mode);
34
35#ifdef HAVE_READLINK
36PyAPI_FUNC(int) _Py_wreadlink(
37 const wchar_t *path,
38 wchar_t *buf,
39 size_t bufsiz);
40#endif
41
42#ifdef HAVE_REALPATH
43PyAPI_FUNC(wchar_t*) _Py_wrealpath(
44 const wchar_t *path,
Victor Stinner015f4d82010-10-07 22:29:53 +000045 wchar_t *resolved_path,
46 size_t resolved_path_size);
Victor Stinner4e314432010-10-07 21:45:39 +000047#endif
48
49PyAPI_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 */