| 166 | return fl::ifstream(mFs->openRead(path)); |
| 167 | } |
| 168 | Video FileSystem::openVideo(const char *path, fl::size pixelsPerFrame, float fps, |
| 169 | fl::size nFrameHistory) { |
| 170 | Video video(pixelsPerFrame, fps, nFrameHistory); |
| 171 | fl::ifstream file = openRead(path); |
| 172 | if (!file.is_open()) { |
| 173 | video.setError(fl::string("Could not open file: ").append(path)); |
| 174 | return video; |
| 175 | } |
| 176 | video.begin(file.rdbuf()); |
| 177 | return video; |
| 178 | } |
| 179 | |
| 180 | bool FileSystem::readText(const char *path, fl::string *out) { |
| 181 | fl::ifstream file = openRead(path); |