StripAll
This function removes the directory and extension parts of a file path.
Syntax
- static std::string StripAll(const std::string& path)
Parameters
- path: the file path name to process.
Returns
Returns the file name, with no directory or extension. For example, FileSystem::StripAll("\Applications\MyGame\readme.txt") will return "readme".
Example
#include "Leadwerks.h"
using namespace Leadwerks;
int main(int argc, const char *argv[])
{
std::string path = "MyFile.txt";
path = FileSystem::RealPath(path);
//Remove the directory and extension
System::Print(FileSystem::StripAll(path));
return 0;
}