Switch to unified view

a/src/pathut.h b/src/pathut.h
...
...
85
85
86
/// Check that path is traversable and last element exists
86
/// Check that path is traversable and last element exists
87
/// Returns true if last elt could be checked to exist. False may mean that
87
/// Returns true if last elt could be checked to exist. False may mean that
88
/// the file/dir does not exist or that an error occurred.
88
/// the file/dir does not exist or that an error occurred.
89
extern bool path_exists(const std::string& path);
89
extern bool path_exists(const std::string& path);
90
/// Same but must be readable
91
extern bool path_readable(const std::string& path);
90
92
91
/// Return separator for PATH environment variable
93
/// Return separator for PATH environment variable
92
extern std::string path_PATHsep();
94
extern std::string path_PATHsep();
95
96
#ifdef _WIN32
97
#define SYSPATH(PATH, SPATH) wchar_t PATH ## _buf[2048];      \
98
    utf8towchar(PATH, PATH ## _buf, 2048);                    \
99
    wchar_t *SPATH = PATH ## _buf;
100
#else
101
#define SYSPATH(PATH, SPATH) const char *SPATH = PATH.c_str()
102
#endif
93
103
94
/// Dump directory
104
/// Dump directory
95
extern bool readdir(const std::string& dir, std::string& reason,
105
extern bool readdir(const std::string& dir, std::string& reason,
96
                    std::set<std::string>& entries);
106
                    std::set<std::string>& entries);
97
107