RealPath
This function returns a formatted file path name.
Syntax
- static std::string RealPath(const std::string& path)
Parameters
- path: the name of the path to process.
Returns
Returns a formatted file path from an unformatted ones. This will replace forward slashes ("\") with backslashes ("/") and remove ".." and "." folder names.
Example
#include "Leadwerks.h"
using namespace Leadwerks;
int main(int argc, const char *argv[])
{
std::string path = "MyFile.txt";
System::Print(FileSystem::RealPath(path));
return 0;
}