CSplitpath:GetDrive
The GetDrive method returns the drive name, like C:, from a CSplitpath object.
sDrive = CSplitpath:GetDrive() where |
|
sDirectory is a string containing the drive name. On failure, nil is returned.
Suppose a file exists with a full path named sPath. The following script retrieves the drive name component:
|
-- create a CSplitpath object for path sPath |
|
-- returns the drive name component |