Switch to unified view

a/src/utils/readfile.h b/src/utils/readfile.h
...
...
32
    virtual bool data(const char *buf, int cnt, std::string* reason) = 0;
32
    virtual bool data(const char *buf, int cnt, std::string* reason) = 0;
33
};
33
};
34
bool file_scan(const std::string& filename, FileScanDo* doer, std::string *reason = 0);
34
bool file_scan(const std::string& filename, FileScanDo* doer, std::string *reason = 0);
35
/* Same but only process count cnt from offset offs. Set cnt to size_t(-1)
35
/* Same but only process count cnt from offset offs. Set cnt to size_t(-1)
36
 * for no limit */
36
 * for no limit */
37
bool file_scan(const std::string& fn, FileScanDo* doer, off_t offs, size_t cnt,
37
bool file_scan(const std::string& fn, FileScanDo* doer, int64_t offs, size_t cnt,
38
               std::string *reason = 0);
38
               std::string *reason = 0);
39
39
40
/**
40
/**
41
 * Read file into string.
41
 * Read file into string.
42
 * @return true for ok, false else
42
 * @return true for ok, false else
43
 */
43
 */
44
bool file_to_string(const std::string& filename, std::string& data, std::string *reason = 0);
44
bool file_to_string(const std::string& filename, std::string& data, std::string *reason = 0);
45
45
46
/** Read file chunk into string. Set cnt to size_t(-1) for whole file */
46
/** Read file chunk into string. Set cnt to size_t(-1) for whole file */
47
bool file_to_string(const std::string& filename, std::string& data,
47
bool file_to_string(const std::string& filename, std::string& data,
48
                    off_t offs, size_t cnt, std::string *reason = 0);
48
                    int64_t offs, size_t cnt, std::string *reason = 0);
49
49
50
#endif /* _READFILE_H_INCLUDED_ */
50
#endif /* _READFILE_H_INCLUDED_ */