mirror of https://github.com/kiwix/libkiwix.git
+ getFileSize() method
This commit is contained in:
parent
e9740183c2
commit
cef66b20e1
|
@ -422,4 +422,16 @@ namespace kiwix {
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Return the file size, works also for splitted files */
|
||||||
|
unsigned int Reader::getFileSize() {
|
||||||
|
zim::File *file = this->getZimFileHandler();
|
||||||
|
zim::offset_type size = 0;
|
||||||
|
|
||||||
|
if (file != NULL) {
|
||||||
|
size = file->getFilesize();
|
||||||
|
}
|
||||||
|
|
||||||
|
return size;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include "time.h"
|
#include "time.h"
|
||||||
|
#include "../pathTools.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
@ -63,6 +64,7 @@ namespace kiwix {
|
||||||
bool canCheckIntegrity();
|
bool canCheckIntegrity();
|
||||||
bool isCorrupted();
|
bool isCorrupted();
|
||||||
bool parseUrl(const string &urlStr, char *ns, string &titleStr);
|
bool parseUrl(const string &urlStr, char *ns, string &titleStr);
|
||||||
|
unsigned int getFileSize();
|
||||||
zim::File* getZimFileHandler();
|
zim::File* getZimFileHandler();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
Loading…
Reference in New Issue