blob: 7c18cf237852009bbdf6ceb65ab2228fd1ec8471 [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
Brett Cannonefb00c02012-02-29 18:31:31 -05008PyAPI_FUNC(PyObject *) _Py_device_encoding(int);
9
Victor Stinner4e314432010-10-07 21:45:39 +000010PyAPI_FUNC(wchar_t *) _Py_char2wchar(
Victor Stinner168e1172010-10-16 23:16:16 +000011 const char *arg,
12 size_t *size);
Victor Stinner4e314432010-10-07 21:45:39 +000013
14PyAPI_FUNC(char*) _Py_wchar2char(
Victor Stinner2f02a512010-11-08 22:43:46 +000015 const wchar_t *text,
16 size_t *error_pos);
Victor Stinner4e314432010-10-07 21:45:39 +000017
Victor Stinnerb306d752010-10-07 22:09:40 +000018#if defined(HAVE_STAT) && !defined(MS_WINDOWS)
Victor Stinner4e314432010-10-07 21:45:39 +000019PyAPI_FUNC(int) _Py_wstat(
20 const wchar_t* path,
21 struct stat *buf);
22#endif
23
24#ifdef HAVE_STAT
25PyAPI_FUNC(int) _Py_stat(
Victor Stinnera4a75952010-10-07 22:23:10 +000026 PyObject *path,
Victor Stinner4e314432010-10-07 21:45:39 +000027 struct stat *statbuf);
28#endif
29
30PyAPI_FUNC(FILE *) _Py_wfopen(
31 const wchar_t *path,
32 const wchar_t *mode);
33
34PyAPI_FUNC(FILE*) _Py_fopen(
Victor Stinnera4a75952010-10-07 22:23:10 +000035 PyObject *path,
Victor Stinner4e314432010-10-07 21:45:39 +000036 const char *mode);
37
38#ifdef HAVE_READLINK
39PyAPI_FUNC(int) _Py_wreadlink(
40 const wchar_t *path,
41 wchar_t *buf,
42 size_t bufsiz);
43#endif
44
45#ifdef HAVE_REALPATH
46PyAPI_FUNC(wchar_t*) _Py_wrealpath(
47 const wchar_t *path,
Victor Stinner015f4d82010-10-07 22:29:53 +000048 wchar_t *resolved_path,
49 size_t resolved_path_size);
Victor Stinner4e314432010-10-07 21:45:39 +000050#endif
51
52PyAPI_FUNC(wchar_t*) _Py_wgetcwd(
53 wchar_t *buf,
54 size_t size);
55
56#ifdef __cplusplus
57}
58#endif
59
60#endif /* !Py_FILEUTILS_H */