| 66 | |
| 67 | |
| 68 | static std::ifstream* getInStream(const std::string& path, |
| 69 | std::ios::openmode mode) { |
| 70 | if (isDirectory(path)) { |
| 71 | return NULL; |
| 72 | } |
| 73 | std::ifstream* stream = new std::ifstream(path.c_str(), mode); |
| 74 | if (stream && *stream) { |
| 75 | return stream; // ready for reading |
| 76 | } |
| 77 | delete stream; |
| 78 | return NULL; |
| 79 | } |
| 80 | |
| 81 | |
| 82 | std::istream* FileManager::createDataInStream(const std::string& filename, |
no test coverage detected