13.3 Volumes Collection

Represents a collection of volumes on a NetWare server.

13.3.1 Element method

Finds the volume specified by the Volume parameter.

Syntax

object.Element( 
   Volume As Variant)

Parameters

Volume

Can be string or integer. The string represents the name of the Volume.The integer represents the number starting from 0 for volume Sys and moves upwards.

Return Values

Volume.

Example

This example returns name of the volume Barney.

’Get all information about Barney 
Set volmgr = CreateObject ("UCX:VolumeMgr") 
Set vols = volmgr.Volumes 
Set volume = Vols.Element("Barney") 
If ( Err.Number=0) then 
     print "The volume is: "&volume.Name
else 
     print("Error is " & Err.Description) 
endif

13.3.2 HasMoreElements method

Determines whether the collection contains more Volume objects.

Syntax

object.HasMoreElements()

Parameters

None.

Return Values

Boolean. Returns TRUE if the collection contains more Volume objects else returns FALSE.

Example

For more details on HasMoreElements () see Example.

13.3.3 Next method

Returns the next volume.

Syntax

object.Next()

Parameters

None.

Return Values

Volume. Returns the next volume, or NULL if no more volumes exist.

Example

see for a sample in Example.

13.3.4 Reset method

Resets the collection of volume objects.

Syntax

object.Reset()

Parameters

None.

Return Values

None.

Remarks

This is the first operation while iterating over all the volumes on the default file server.

Example

see for a sample in Example.