Represents a collection of restrictions for all users on a NetWare volume.
Returns the restriction information for a specified user.
object.Element(
UserName As String)
The name of the User object.
VolumeRestriction.
This example returns the restriction information about user TestUser.
Set volmgr = CreateObject ("UCX:VolumeMgr")
Set volumes = volmgr.Volumes
Set volume = Volumes.Element("Sys")
If (Err.Number = 0) then
Set RestrictionsObj = volume.GetSpaceRestriction ()
If (Err.Number = 0) then
Set restr = RestrictionsObj.Element("guest")
If (Err.Number = 0) then
Print "The restriction volume limit for "&restr.Name
& " is " &restr.VolumeLimit
Else
Print("Failed to find restriction for the specified
user " & Err.Description )
Endif
Else
Print ("Failed to get restrictions object " &
Err.Description)
Endif
Else
Print ("Failed to find the volume " & Err.Description)
Endif
Determines whether the collection contains more VolumeRestriction objects.
Object.HasMoreElements()
None.
Boolean. Returns TRUE if the collection contains more VolumeRestriction objects; otherwise, FALSE.
This sample returns the restriction limit for the volume restriction objects by searching for all the restriction objects in the volume Sys.
Set volmgr = CreateObject ("UCX:VolumeMgr")
Set vols = volmgr.volumes
Set volume = Vols.Element("Sys")
If (Err.Number=0) then
Set RestrictionsObj = volume.GetSpaceRestriction()
If (Err.Number=0) then
RestrictionsObj.Reset()
While RestrictionsObj.HasMoreElements()
Set restr = RestrictionsObj.Next()
Print "The restriction volume limit for "&restr.Name
" is " &restr.VolumeLimit
Wend
Else
Print "Failed to get restrictions object " &
Err.Description
Endif
Else
Print "Failed to find the volume " & Err.Description
Endif
Returns the next VolumeRestriction object, or NULL if no other objects exist.
object.Next()
None.
VolumeRestriction.
Returns Null if no volume restriction object exists.
See sample in Example.
Initiates a search for all restrictions on a specified volume.
object.Reset()
None.
Void.
See sample in Example.