CSplitpath:GetFilename
The GetFilename method returns the filename from a CSplitpath object. The filename includes no directory or file extension.
sFileName = CSplitpath:GetFilename() where |
sFileName is a string containing the file name. On failure, nil is returned.
Suppose a file exists with a full path named sPath. The following script retrieves the file name component:
|
-- create a CSplitpath object for path sPath |
|
-- returns the file name |