]> Creatis software - crea.git/blobdiff - lib/creaDevManagerLib/modelCDMFile.cpp
Feature #1711
[crea.git] / lib / creaDevManagerLib / modelCDMFile.cpp
index 6fcfab6560982f1d1d2b75dd8a49e9c9f8091115..8e8a40faa5966dfb828dc6a157db3071399cfcfb 100644 (file)
@@ -34,6 +34,7 @@
 
 #include "modelCDMFile.h"
 
+#include <fstream>
 #include <creaWx.h>
 #include <wx/dir.h>
 
@@ -57,6 +58,11 @@ modelCDMFile::modelCDMFile(const std::string& path, const int& level)
 
   this->path = path;
   this->type = wxDIR_FILES;
+
+  std::ifstream in(path.c_str(), std::ifstream::in | std::ifstream::binary);
+  in.seekg(0, std::ifstream::end);
+  this->length = in.tellg();
+
 }
 
 modelCDMFile::~modelCDMFile()