StripAll
This function removes the directory and extension parts of a file path.
Syntax
- string StripAll(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
local path = "MyFile.txt"
path = FileSystem:RealPath(path)
--Remove the directory and extension
System:Print((FileSystem:StripAll(path)))