StripDir

This function removes the directory part of a file path.

Syntax

Parameters

Returns

Returns the file name and extension without the directory part.

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
System::Print(FileSystem::StripDir(path));

return 0;
}