13.7 ExtendedVolInfo Object

Gives additional information about the volume.

13.7.1 ClusterSize property

Indicates the number of sectors per cluster on the mounted volume.

Syntax

object.ClusterSize

Type

Long.

Attributes

Read-only.

Example

See sample in Example.

See Also

13.7.2 CompressAfter property

Indicates the amount of disk space used by all the compressed files on the mounted volume.

Syntax

object.CompressAfter

Type

Long.

Attributes

Read-only.

Example

See sample in Example.

13.7.3 CompressBefore property

Indicates the amount of disk space allocated to all files on the mounted volume before they were compressed.

Syntax

object.CompressBefore

Type

Long.

Attributes

Read-only.

Example

See sample in Example.

13.7.4 CompressDeleted property

Indicates the number of data streams for compressed files that have been deleted from the mounted volume.

Syntax

object.CompressDeleted

Type

Long.

Attributes

Read-only.

Example

See sample in Example.

13.7.5 CompressFiles property

Indicates the number of data streams for real compressed files on the mounted volume.

Syntax

object.CompressFiles

Type

Long.

Attributes

Read-only.

Example

See sample in Example.

13.7.6 DeletedFiles property

Indicates the number of data streams on the mounted volume for deleted files with data allocated to them.

Syntax

object.DeletedFiles

Type

Long.

Attributes

Read-only.

Example

See sample in Example.

13.7.7 Flags property

Gives the extended information about the mounted volume.

Syntax

object.Flags

Type

String.

Attributes

Read-only.

Remarks

This property gives the volume status flags. Various bits of this flag are shown below. All the flags are represented as hexadecimal numbers. If multiple flags are enabled the output will be a ORed value of all the enabled flags.

0x01

NWSubAllocEnableBit

0x02

NWCompressionEnabledBit

0x04

NWMigrationEnableBit

0x08

NWAuditingEnabledBit

0x10

NWReadOnlyEnableBit

Example

See sample in Example.

13.7.8 NameSpaces property

Gives a list of name spaces on the mounted volume.

Syntax

object.NameSpaces

Type

String.

Attributes

Read-only.

Remarks

Various types of name spaces are shown below.

0

DOS

1

Macintosh

2

NFS

3

FTAM

4

OS2

5

NT

Example

See sample in Example.

13.7.9 SectorSize property

Indicates the sector size, in bytes, on the mounted volume.

Syntax

object.SectorSize

Type

Long.

Attributes

Read-only.

Example

This sample gives all the additional information on volume Sys.

On Error Resume Next
Set volmgr = CreateObject ("UCX:VolumeMgr")
Set vols = volmgr.Volumes
Set volume = Vols.Element("Sys")
If (Err.Number=0) Then
   Set ExtdInfo = volume.ExtendedVolInfo
   Print "The number of sectors per cluster is
"&ExtdInfo.ClusterSize
   Print "The disk space used by compressed files "
 &ExtdInfo.CompressAfter
   Print "The disk space used before compression"&
 ExtdInfo.CompressBefore
     Print "The number of data streams deleted for compressed
files "&ExtdInfo.CompressDeleted
   Print "The number of data streams for compressed files
"&ExtdInfo.CompressFiles
   Print "The number of data streams for deleted files
"&ExtdInfo.DeletedFiles
   Print "The extended information about volume
"&ExtdInfo.Flags
   Print "The namespaces present in the volume "&
 ExtdInfo.Namespaces
   Print "The size of the sector is: "&ExtdInfo.SectorSize
Else
   Print "Failed to find the volume "&Err.Description
Endif

13.7.10 RemoveSpaceRestriction method

Removes the volume space restriction for a specified user on the mounted volume.

Syntax

object.RemoveSpaceRestriction()

Parameters

None.

Return Values

Boolean. Returns TRUE if successful, else returns FALSE.

Example

This example removes the volume space restriction for TestUser on volume Sys.

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 Sys
   Set volmgr = CreateObject ("UCX:VolumeMgr")
   Set vols = volmgr.volumes
   Set volume = Vols.Element("Sys")
   Set restns = volume.GetSpaceRestriction()
   If (Err.Number=0) Then
      Set restr = Restns.Element("guest") 
      If (Err.Number=0) Then
         Restr.RemoveSpaceRestriction()
         If (Err.Number=0) Then
            Print "Restriction removed successfully"
         Else
            Print "Failed to remove restriction " &
Err.Description
         Endif
      Else
         Print"Could not remove the restriction
"&Err.description
      Endif
   Else
      Print "GetSpaceRestriction failed - "&Err.Description
   Endif
      nds1.Logout()
Else
  Print "Login failed"
Endif

13.7.11 SetSpaceRestriction method

Sets the volume space restriction for a specified user on the mounted volume.

Syntax

object.SetSpaceRestriction( 
   Value As Long)

Parameters

Value

The value to be set for the user.

Return Values

Boolean. Returns TRUE if successful; otherwise, FALSE.

Example

This example sets the space restriction for TestUser on volume Sys.

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 Sys
   Set volmgr = CreateObject ("UCX:VolumeMgr")
   Set vols = volmgr.volumes
   Set volume = Vols.Element("Sys")
   Set restns = volume.GetSpaceRestriction()
   If (Err.Number=0) Then
      Set restr = Restns.Element("guest") 
      If (Err.Number=0) Then
         Restr.SetSpaceRestriction(3000)
         If (Err.Number=0) Then
            Print "Restriction set successfully"
         Else
            Print "Failed to set restriction " & Err.Description
         Endif
      Else
         Print "Could not set the restriction "&Err.description
      Endif
   Else
      Print "SetSpaceRestriction failed - "&Err.Description
   Endif
      nds1.Logout()
Else
  Print "Login failed"
Endif