StripDir
This function removes the directory part of a file path.
Syntax
- string StripDir(string path)
Parameters
- path: the file path to process.
Returns
Returns the file name and extension without the directory part.
Example
local path = "MyFile.txt"
path = FileSystem:RealPath(path)
--Remove the directory and extension
System:Print((FileSystem:StripDir(path)))