I've done some searches for this, but I haven't found anyone with the exact problem I'm having. When trying to call createAndOpenFile, the program crashes every time. The debug outputs I've added (printing 2 and 3 to standard output) confirm that this is the line causing the problem, as I get a 2 and not a 3.
Code: Select all
irr::io::IFileSystem* fs = device->getFileSystem();
irr::core::stringw fileName = mapFolder + name;
std::cout << "2";
irr::io::IReadFile* wf = fs->createAndOpenFile(fileName);
std::cout << "3";
The only thing I can think of is that a stringw is not a valid input for createAndOpenFile, but it does not give me any compiler errors or warnings to confirm this.
On a related note, can anyone confirm if "createAndOpenFile" actually does create a file if it doesn't exist? If so, how do I open a file without trying to create it?