This function fixes a file path by adding the complete directory path and replacing backslashes with forward slashes. The file path does not have to specify an existing file.
Parameter | Description |
---|---|
path | file path to correct |
Returns the corrected file path.
#include "UltraEngine.h"
using namespace Leadwerks;
int main(int argc, const char* argv[])
{
WString path = "..\\./temp.txt";
Print(RealPath(path));
return 0;
}