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() |
|
|
On success, this method returns a string containing the directory name.
On failure, this method returns nil.
Suppose a file exists with a full path named sPath. The following script 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 |
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.