|
a/sc2src/pathut.h |
|
b/sc2src/pathut.h |
|
... |
|
... |
50 |
extern std::vector<std::string> path_dirglob(const std::string& dir,
|
50 |
extern std::vector<std::string> path_dirglob(const std::string& dir,
|
51 |
const std::string pattern);
|
51 |
const std::string pattern);
|
52 |
/// Encode according to rfc 1738
|
52 |
/// Encode according to rfc 1738
|
53 |
extern std::string url_encode(const std::string& url,
|
53 |
extern std::string url_encode(const std::string& url,
|
54 |
std::string::size_type offs = 0);
|
54 |
std::string::size_type offs = 0);
|
|
|
55 |
extern std::string url_decode(const std::string& encoded);
|
55 |
//// Convert to file path if url is like file://. This modifies the
|
56 |
//// Convert to file path if url is like file://. This modifies the
|
56 |
//// input (and returns a copy for convenience)
|
57 |
//// input (and returns a copy for convenience)
|
57 |
extern std::string fileurltolocalpath(std::string url);
|
58 |
extern std::string fileurltolocalpath(std::string url);
|
58 |
/// Test for file:/// url
|
59 |
/// Test for file:/// url
|
59 |
extern bool urlisfileurl(const std::string& url);
|
60 |
extern bool urlisfileurl(const std::string& url);
|
|
... |
|
... |
116 |
extern std::string path_pathtofileurl(const std::string& path);
|
117 |
extern std::string path_pathtofileurl(const std::string& path);
|
117 |
|
118 |
|
118 |
#ifdef _WIN32
|
119 |
#ifdef _WIN32
|
119 |
/// Convert \ separators to /
|
120 |
/// Convert \ separators to /
|
120 |
void path_slashize(std::string& s);
|
121 |
void path_slashize(std::string& s);
|
|
|
122 |
void path_backslashize(std::string& s);
|
121 |
#endif
|
123 |
#endif
|
122 |
|
124 |
|
123 |
/// Lock/pid file class. This is quite close to the pidfile_xxx
|
125 |
/// Lock/pid file class. This is quite close to the pidfile_xxx
|
124 |
/// utilities in FreeBSD with a bit more encapsulation. I'd have used
|
126 |
/// utilities in FreeBSD with a bit more encapsulation. I'd have used
|
125 |
/// the freebsd code if it was available elsewhere
|
127 |
/// the freebsd code if it was available elsewhere
|