Blockland Forums
Home
Help
Login
Register
Blockland Forums
»
Blockland Forums
»
Modification Help
»
getFileName
« previous
next »
Print
Pages: [
1
]
Author
Topic: getFileName (Read 362 times)
Plexious
September 24, 2012, 04:35:05 PM
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".
Ad Bot
Advertisement
Headcrab Zombie
September 24, 2012, 04:37:18 PM
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
»
Greek2me
September 24, 2012, 04:40:38 PM
Here are all the default file functions.
(plus fileCopy and fileDelete)
The function you're looking for is called
fileBase("path/to/file.txt");
Plexious
September 24, 2012, 04:53:43 PM
Thanks, that helps.
Greek2me
September 24, 2012, 04:56:28 PM
No problem!
Print
Pages: [
1
]
« previous
next »
Blockland Forums
»
Blockland Forums
»
Modification Help
»
getFileName