Author Topic: getFileName  (Read 362 times)

Could somebody write a getFileName function for me?
Basically it would remove the path and the extension from a string. So getFileName("Add-Ons/Weapon_Gun/Pistol.dts"); would return "Pistol".

I'm pretty sure something like this is already default, I'll see if I can find the name
EDIT: fileBase

==> echo(fileBase("Add-Ons/Weapon_Gun/Pistol.dts"));
Pistol
« Last Edit: September 24, 2012, 04:39:33 PM by Headcrab Zombie »

Here are all the default file functions. (plus fileCopy and fileDelete)

The function you're looking for is called fileBase("path/to/file.txt");