IlvDisplay* display = new IlvDisplay(“AppName”, “DisplayName”, argc, argv); if (display->isBad()) { delete display; IlvFatalError(“Could not create display”); IlvExit(-1); } const char* dirName = “./localDirectory/subDirectory”; const char* fileName = “foo.txt”; display->prependToPath(dirName); // Now, if a file such as // “./localDirectory/subDirectory/foo.txt” // or // “.\localDirectory\subDirectory\foo.txt” // exists, we should be able to find it. const char* filePath = display->findInPath(fileName); if (filePath) IlvPrint(“File %s found at %s”, fileName, filePath); else IlvWarning(“File %s not found”, fileName); |