CSplitpath:GetExt
The GetExt method returns the file extension from a CSplitpath object. The extension is returned with a preceding dot, as in ".fts". To return the path without a preceding dot, use GetExt2().
sExt = CSplitpath:GetExt() |
|
Suppose a file exists with a full path named sPath. The following script fragment retrieves the file extension component:
|
-- create a CSplitpath object |
|
-- Specify the path to be split |
|
-- assigns the file extension component to the string sExt. |
|
-- when done with S, remove it from memory |