~ubuntu-branches/ubuntu/precise/boinc/precise

« back to all changes in this revision

Viewing changes to lib/filesys.h

Tags: 6.12.8+dfsg-1
* New upstream release.
* Simplified debian/rules

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
#if defined(_WIN32) && !defined(__CYGWIN32__)
27
27
#else
28
 
#include <stdio.h>
29
28
#include <dirent.h>
30
29
#include <grp.h>
31
 
 
 
30
#include <stdio.h>
 
31
#include <sys/types.h>
32
32
#ifdef __cplusplus
33
33
#include <string>
34
34
#endif
48
48
  extern int boinc_chown(const char*, gid_t);
49
49
#endif
50
50
  extern int boinc_rmdir(const char*);
51
 
  extern int remove_project_owned_file_or_dir(const char* path);
52
51
  extern void boinc_getcwd(char*);
53
52
  extern void relative_to_absolute(const char* relname, char* path);
54
53
  extern int boinc_make_dirs(char*, char*);
70
69
extern int file_size(const char*, double&);
71
70
extern int clean_out_dir(const char*);
72
71
extern int dir_size(const char* dirpath, double&, bool recurse=true);
73
 
extern int get_filesystem_info(double& total, double& free, char* path=".");
 
72
extern int get_filesystem_info(double& total, double& free, char* path=const_cast<char *>("."));
74
73
 
75
74
// TODO TODO TODO
76
75
// remove this code - the DirScanner class does the same thing.
89
88
 
90
89
extern DIRREF dir_open(const char*);
91
90
extern int dir_scan(char*, DIRREF, int);
92
 
int dir_scan(std::string&, DIRREF);
 
91
extern int dir_scan(std::string&, DIRREF);
93
92
extern void dir_close(DIRREF);
94
93
 
 
94
extern bool is_dir_empty(const char*);
95
95
 
96
96
class DirScanner {
97
97
#if defined(_WIN32) && !defined(__CYGWIN32__)
113
113
#else
114
114
    int fd;
115
115
#endif
 
116
    bool locked;
116
117
    FILE_LOCK();
117
118
    ~FILE_LOCK();
118
119
    int lock(const char* filename);