CSplitpath:SetPath


The SetPath method assigns a path name to the CSplitpath object and splits it into its components. The Split method may also be used to split a path.

Syntax

bSuccess = CSplitpath:SetPath( sPath )

where

 

    sPath is the new path.

    bSuccess is the returned success code. On success it is true, otherwise false.

Example

Suppose a file exists with a full path named sPath. The following script assigns the path name and splits it into components:

S = CSplitpath:new( sPath )

-- create a CSplitpath object for path sPath

S:SetPath( sNewPath )

-- assign the new path and split it

Related Topics

CSplitpath class