mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-19 00:07:13 +02:00
WIP
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
#include "sls/sls_detector_exceptions.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <ios>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <sys/stat.h>
|
||||
@ -92,3 +93,13 @@ void mkdir_p(const std::string &path, std::string dir) {
|
||||
if (i + 1 < path.length())
|
||||
mkdir_p(path.substr(i + 1), dir);
|
||||
}
|
||||
|
||||
namespace sls {
|
||||
int getFileSize(std::ifstream &ifs) {
|
||||
auto current_pos = ifs.tellg();
|
||||
ifs.seekg(0, std::ios::end);
|
||||
int file_size = ifs.tellg();
|
||||
ifs.seekg(current_pos);
|
||||
return file_size;
|
||||
}
|
||||
} // namespace sls
|
||||
|
Reference in New Issue
Block a user