9#include "convertToString.h"
19 fs.open(fileName.c_str());
21 std::cerr <<
"openFileStream : can't open file '" << fileName <<
"'" << std::endl;
32 fs.open(fileName.c_str());
34 std::cerr <<
"openFileStream : can't open file '" << fileName <<
"'" << std::endl;
46 if(nbFile == 0lu){
return true;}
47 PPath baseFileName(fileName.eraseExtension()), extention(fileName.getExtension());
48 if(extention !=
""){extention = PString(
"." + extention);}
52 for(PVecOFStream::iterator it(fs.begin()); it != fs.end(); ++it){
53 PPath tmpFileName(baseFileName + PPath(
"_") + valueToString(i) + extention);
67 if(nbFile == 0lu){
return true;}
68 PPath baseFileName(fileName.eraseExtension()), extention(fileName.getExtension());
69 if(extention !=
""){extention = PPath(
"." + extention);}
73 for(PVecIFStream::iterator it(fs.begin()); it != fs.end(); ++it){
74 PPath tmpFileName(baseFileName + PPath(
"_") + valueToString(i) + extention);
85 for(PVecOFStream::iterator it(fs.begin()); it != fs.end(); ++it){
94 for(PVecIFStream::iterator it(fs.begin()); it != fs.end(); ++it){
bool openFileStream(std::ofstream &fs, const PPath &fileName)
Open a ofstream and says if there is a problem.
void closeFileStream(PVecOFStream &fs)
Close a vector of ofstream.
std::vector< std::ifstream > PVecIFStream
std::vector< std::ofstream > PVecOFStream