CSplitpath:Split


The Split method assigns a path name to the CSplitpath object and splits it into its components.

Syntax

bSuccess = CSplitpath:Split( sPath )

 

bullet.gif    On success, this method returns true.

bullet.gif    On failure, this method returns false.

Remarks

This is essentially an alias for the SetPath method but SetPath is usually used right after new, whereas Split is normally used after working on the path components.

Example

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

S = new_splitpath()

-- create a CSplitpath object

S:Split(sPath)

-- assign the path and split it into components

  ...

-- do something

S:delete()

-- when done with S, remove it from memory

Related Topics

CSplitpath class, Merge


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics, Inc. All Rights Reserved.