Switch to unified view

a/src/utils/pathut.h b/src/utils/pathut.h
...
...
17
#ifndef _PATHUT_H_INCLUDED_
17
#ifndef _PATHUT_H_INCLUDED_
18
#define _PATHUT_H_INCLUDED_
18
#define _PATHUT_H_INCLUDED_
19
#include <unistd.h>
19
#include <unistd.h>
20
20
21
#include <string>
21
#include <string>
22
#include <list>
22
#include <vector>
23
#include "refcntr.h"
23
#include "refcntr.h"
24
24
25
#ifndef NO_NAMESPACES
25
#ifndef NO_NAMESPACES
26
using std::string;
26
using std::string;
27
using std::list;
27
using std::vector;
28
#endif
28
#endif
29
29
30
/// Add a / at the end if none there yet.
30
/// Add a / at the end if none there yet.
31
extern void path_catslash(string &s);
31
extern void path_catslash(string &s);
32
/// Concatenate 2 paths
32
/// Concatenate 2 paths
...
...
44
/// Use getcwd() to make absolute path if needed. Beware: ***this can fail***
44
/// Use getcwd() to make absolute path if needed. Beware: ***this can fail***
45
/// we return an empty path in this case.
45
/// we return an empty path in this case.
46
extern string path_absolute(const string &s);
46
extern string path_absolute(const string &s);
47
/// Clean up path by removing duplicated / and resolving ../ + make it absolute
47
/// Clean up path by removing duplicated / and resolving ../ + make it absolute
48
extern string path_canon(const string &s);
48
extern string path_canon(const string &s);
49
/// Use glob(3) to return a list of file names matching pattern inside dir
49
/// Use glob(3) to return the file names matching pattern inside dir
50
extern list<string> path_dirglob(const string &dir, 
50
extern vector<string> path_dirglob(const string &dir, 
51
                    const string pattern);
51
                   const string pattern);
52
/// Encode according to rfc 1738
52
/// Encode according to rfc 1738
53
extern string url_encode(const string& url, 
53
extern string url_encode(const string& url, 
54
                  string::size_type offs = 0);
54
                  string::size_type offs = 0);
55
/// Transcode to utf-8 if possible or url encoding, for display.
55
/// Transcode to utf-8 if possible or url encoding, for display.
56
extern bool printableUrl(const string &fcharset, 
56
extern bool printableUrl(const string &fcharset,