|
a/src/utils/pathut.h |
|
b/src/utils/pathut.h |
|
... |
|
... |
14 |
* Free Software Foundation, Inc.,
|
14 |
* Free Software Foundation, Inc.,
|
15 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
15 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
16 |
*/
|
16 |
*/
|
17 |
#ifndef _PATHUT_H_INCLUDED_
|
17 |
#ifndef _PATHUT_H_INCLUDED_
|
18 |
#define _PATHUT_H_INCLUDED_
|
18 |
#define _PATHUT_H_INCLUDED_
|
19 |
/* @(#$Id: pathut.h,v 1.12 2007-02-06 14:16:43 dockes Exp $ (C) 2004 J.F.Dockes */
|
19 |
/* @(#$Id: pathut.h,v 1.13 2007-06-08 15:30:01 dockes Exp $ (C) 2004 J.F.Dockes */
|
20 |
|
20 |
|
21 |
#include <string>
|
21 |
#include <string>
|
22 |
#include <list>
|
22 |
#include <list>
|
23 |
#include "refcntr.h"
|
23 |
#include "refcntr.h"
|
24 |
|
24 |
|
|
... |
|
... |
53 |
extern string url_encode(const string url,
|
53 |
extern string url_encode(const string url,
|
54 |
string::size_type offs);
|
54 |
string::size_type offs);
|
55 |
/// Stat parameter and check if it's a directory
|
55 |
/// Stat parameter and check if it's a directory
|
56 |
extern bool path_isdir(const string& path);
|
56 |
extern bool path_isdir(const string& path);
|
57 |
|
57 |
|
|
|
58 |
/** A small wrapper around statfs et al, to return percentage of disk
|
|
|
59 |
occupation */
|
|
|
60 |
bool fsocc(const string &path, int *pc, // Percent occupied
|
|
|
61 |
long *avmbs = 0 // Mbs available to non-superuser
|
|
|
62 |
);
|
|
|
63 |
|
58 |
/// Create temporary directory
|
64 |
/// Create temporary directory
|
59 |
extern bool maketmpdir(string& tdir, string& reason);
|
65 |
extern bool maketmpdir(string& tdir, string& reason);
|
60 |
|
66 |
|
61 |
/// Temporary file class
|
67 |
/// Temporary file class
|
62 |
class TempFileInternal {
|
68 |
class TempFileInternal {
|