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 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 <map>
|
||||
#include "time.h"
|
||||
#include "../pathTools.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
@ -63,6 +64,7 @@ namespace kiwix {
|
|||
bool canCheckIntegrity();
|
||||
bool isCorrupted();
|
||||
bool parseUrl(const string &urlStr, char *ns, string &titleStr);
|
||||
unsigned int getFileSize();
|
||||
zim::File* getZimFileHandler();
|
||||
|
||||
protected:
|
||||
|
|
Loading…
Reference in New Issue