CSplitpath:GetName


The GetName method returns the machine name from a CSplitpath object.

Syntax

sMachineName = CSplitpath:GetName()

where

 

    sMachineName is a string containing the machine name. On failure, nil is returned.

Example

Suppose a file exists with a full path named sPath. The following script retrieves the file name:

S = CSplitpath:new( sPath )

-- create a CSplitpath object for path sPath

sName = S:GetName()

-- returns the machine name component

Related Topics

CSplitpath class