13.4 Volume Object

Represents a NetWare volume.

13.4.1 BlockSize property

Gives the size in bytes, of a specified block.

Syntax

Object.BlockSize

Type

Long.

Attributes

Read-only.

Example

See for a sample in Example.

13.4.2 ExtendedVolInfo property

Returns an extended information object that contains additional information about the volume.

Syntax

Object.ExtendedVolInfo

Type

ExtendedVolInfo.

Attributes

Read-only.

Remarks

Obj is a placeholder for the extended volume information object.

Example

See for a sample in Example.

13.4.3 FreeDir property

Indicates the number of directories that can be created, based on the difference between the total allowable number of directories and the number of directories already created.

Syntax

object.FreeDir

Type

Long.

Attributes

Read-only.

Example

See for a sample in Example.

13.4.4 FreeSpace property

Indicates the available space, in kilobytes, on a specified volume.

Syntax

object.FreeSpace

Type

Long.

Attributes

Read-only.

Example

See for a sample in Example.

13.4.5 Hashing property

Indicates whether the volume is hashing in the file server memory.

Syntax

object.Hashing

Type

Boolean. Returns TRUE if the volume is hashing else returns FALSE.

Attributes

Read-only.

Remarks

This property returns FALSE for non-hashing file server memory.

Example

See for a sample in Example.

13.4.6 Mounted property

Determines whether the specified volume is already mounted.

Syntax

object.Mounted

Type

Boolean. Returns TRUE if the volume is already mounted else returns FALSE.

Attributes

Read-only.

Example

See for a sample in Example.

13.4.7 Name property

Gives the name of the volume.

Syntax

object.Name

Type

String.

Attributes

Read-only.

Example

See for a sample in Example.

13.4.8 PurgableSpace property

Gives the total space that can be purged on the specified volume.

Syntax

object.PurgableSpace

Type

Long.

Attributes

Read-only.

Example

See for a sample in Example.

13.4.9 Removable property

Indicates the specified volume can be physically removed from the file server.

Syntax

object.Removable

Type

Boolean. Returns TRUE if the volume can be removed else returns FALSE.

Attributes

Read-only.

Remarks

This property returns FALSE for volumes that cannot be physically removed.

Example

See for a sample in Example.

13.4.10 TotalDir property

Gives the total number of directories on the volume.

Syntax

object.TotalDir

Type

Long.

Attributes

Read-only.

Example

See for a sample in Example.

13.4.11 TotalSpace property

Gives the total space, in kilobytes, on the specified volume.

Syntax

object.TotalSpace

Type

Long.

Attributes

Read-only.

Example

This sample gives all the information related to volume Sys.

On Error Resume Next
’Get all information about Sys 
Set volmgr = CreateObject ("UCX:VolumeMgr") 
Set volumes = volmgr.Volumes 
Set volume = Volumes.Element("Sys")
If (Err.Number = 0) then 
   Print ("Block Size is "&volume.BlockSize)
   Print ("Volume Name is "&volume.Name)
   Print ("The number of directories that can be created "&
   volume.FreeDir)
   Print ("The available space in KB: "&volume.FreeSpace)
   Print ("The volume is hashing "&volume.Hashing)
   Print ("The mounted status is "&volume.Mounted)
   Print ("The purgable space in KB "&volume.PurgableSpace)
   Print ("The removable status is "&volume.Removable)
   Print ("The total number directories in this volume
   "&volume.TotalDir)
   Print ("The total space on the volume in KB
   "&volume.TotalSpace)
Else 
     Print("Error is " & Err.Description) 
Endif

13.4.12 Dismount method

Dismounts a NetWare volume.

Syntax

object.Dismount

Parameters

None.

Return Values

Boolean. Returns TRUE if successful. Else returns FALSE.

Example

This example dismounts from volume Barney.

Set nds1 = CreateObject("ucx:NWDir") 
’Log in to an account with supervisory rights 
nds1.Login("username", "password") 
If (Err.Number = 0) then 
     ’Get all information about Barney 
     Set volmgr = CreateObject ("UCX:VolumeMgr") 
     Set vols = volmgr.Volumes 
     Set volume = Vols.Element("Barney")
     volume.Dismount() 
     If (Err.Number = 0) then 
          Print("Volume dismounted") 
     Else 
          Print("Dismount failed " & Err.Description) 
     Endif 
ndslog.Logout()
Else 
Print("Login failed " & Err.Description) 
Endif

13.4.13 GetSpaceRestriction method

Returns the VolumeRestrictions object for a user. The VolumeRestrictions object contains the information about the space restriction for a user on the specified volume.

Syntax

Object.GetSpaceRestriction()

Parameters

None.

Return Values

VolumeRestrictions.

Remarks

obj is a placeholder for the resulting VolumeRestrictions object.

Example

This example returns the VolumeRestrictions object for the user TestUser.

On Error Resume Next
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