CSplitpath:GetDir
The GetDir method returns the directory name from a CSplitpath object. The directory name does not include the machine name, drive name, file name, or extension.
sDirectory = CSplitpath:GetDir() |
|
|
Suppose a file exists with a full path named sPath. The following script fragment retrieves the directory component:
|
-- create a CSplitpath object |
|
-- specify the path to be split |
|
-- assigns the directory component to the string sDir. |
|
-- when done with S, remove it from memory |