blob: 2fade9b95cd8364947a24c478569e86543abcc4d [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(
Victor Stinner2f02a512010-11-08 22:43:46 +000013 const wchar_t *text,
14 size_t *error_pos);
Victor Stinner4e314432010-10-07 21:45:39 +000015
Victor Stinnerb306d752010-10-07 22:09:40 +000016#if defined(HAVE_STAT) && !defined(MS_WINDOWS)
Victor Stinner4e314432010-10-07 21:45:39 +000017PyAPI_FUNC(int) _Py_wstat(
18 const wchar_t* path,
19 struct stat *buf);
20#endif
21
22#ifdef HAVE_STAT
23PyAPI_FUNC(int) _Py_stat(
Victor Stinnera4a75952010-10-07 22:23:10 +000024 PyObject *path,
Victor Stinner4e314432010-10-07 21:45:39 +000025 struct stat *statbuf);
26#endif
27
28PyAPI_FUNC(FILE *) _Py_wfopen(
29 const wchar_t *path,
30 const wchar_t *mode);
31
32PyAPI_FUNC(FILE*) _Py_fopen(
Victor Stinnera4a75952010-10-07 22:23:10 +000033 PyObject *path,
Victor Stinner4e314432010-10-07 21:45:39 +000034 const char *mode);
35
36#ifdef HAVE_READLINK
37PyAPI_FUNC(int) _Py_wreadlink(
38 const wchar_t *path,
39 wchar_t *buf,
40 size_t bufsiz);
41#endif
42
43#ifdef HAVE_REALPATH
44PyAPI_FUNC(wchar_t*) _Py_wrealpath(
45 const wchar_t *path,
Victor Stinner015f4d82010-10-07 22:29:53 +000046 wchar_t *resolved_path,
47 size_t resolved_path_size);
Victor Stinner4e314432010-10-07 21:45:39 +000048#endif
49
50PyAPI_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 */