blob: cb15936611bcc9d9291755de1751b4460314d17c [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 Stinner5d1e34382010-10-15 11:15:54 +00009 const char *arg);
Victor Stinner4e314432010-10-07 21:45:39 +000010
11PyAPI_FUNC(char*) _Py_wchar2char(
12 const wchar_t *text);
13
Victor Stinnerb306d752010-10-07 22:09:40 +000014#if defined(HAVE_STAT) && !defined(MS_WINDOWS)
Victor Stinner4e314432010-10-07 21:45:39 +000015PyAPI_FUNC(int) _Py_wstat(
16 const wchar_t* path,
17 struct stat *buf);
18#endif
19
20#ifdef HAVE_STAT
21PyAPI_FUNC(int) _Py_stat(
Victor Stinnera4a75952010-10-07 22:23:10 +000022 PyObject *path,
Victor Stinner4e314432010-10-07 21:45:39 +000023 struct stat *statbuf);
24#endif
25
26PyAPI_FUNC(FILE *) _Py_wfopen(
27 const wchar_t *path,
28 const wchar_t *mode);
29
30PyAPI_FUNC(FILE*) _Py_fopen(
Victor Stinnera4a75952010-10-07 22:23:10 +000031 PyObject *path,
Victor Stinner4e314432010-10-07 21:45:39 +000032 const char *mode);
33
34#ifdef HAVE_READLINK
35PyAPI_FUNC(int) _Py_wreadlink(
36 const wchar_t *path,
37 wchar_t *buf,
38 size_t bufsiz);
39#endif
40
41#ifdef HAVE_REALPATH
42PyAPI_FUNC(wchar_t*) _Py_wrealpath(
43 const wchar_t *path,
Victor Stinner015f4d82010-10-07 22:29:53 +000044 wchar_t *resolved_path,
45 size_t resolved_path_size);
Victor Stinner4e314432010-10-07 21:45:39 +000046#endif
47
48PyAPI_FUNC(wchar_t*) _Py_wgetcwd(
49 wchar_t *buf,
50 size_t size);
51
52#ifdef __cplusplus
53}
54#endif
55
56#endif /* !Py_FILEUTILS_H */