                              NetDrive for OS/2

                                REXX FUNCTIONS
                                --------------
                                
 Warning: 
 
  This is a living document and changes regularly due to program calls
  and enhancements to the product.   If something doesn't work, please
  check the website for an updated version of these commands and syntax.
                                
  
 ************************************************************************                                
 Function

    NdRxLoadFuncs()
    
        This function automatically loads all NetDrive REXX functions.
 
 Parameters
 
    none
    
 Returns
  
    nothing
 
 Example
 
    call RxFuncAdd 'NdRxLoadFuncs', 'NDCALLS', 'NdRxLoadFuncs'
    call NdRxLoadFuncs
 
 

 ************************************************************************                                
 Function

    NdRxDropFuncs()
    
        Use this function to drop all the loaded NetDrive REXX functions.  
        Once this function is processed by a REXX program, the NetDrive 
        REXX functions are not accessible in any OS/2 sessions. 
 
 Parameters
 
    none
    
 Returns
  
    nothing
 
 Example
 
    call NdRxDropFuncs
 

    
 ************************************************************************                                
 Function

    NdRxAttach( drive [, label [, units [, unitsavail ] ] ] )
    
        This function creates a NDFS drive.
 
 Parameters
 
    drive - drive to be created, e.g. 'S:'
    label - label of the drive, 'NETDRIVE'
    units - total drive size in blocks, each block = 512 bytes
    unitsavail - free (available) blocks on drive, each block = 512 bytes
    
 Returns
  
    Return code from NDFS
 
 Example
 
    drive = 'S:'
    rc = NdRxAttach( drive )

 
    
 ************************************************************************                                
 Function

    NdRxDetach( drive )
    
        This function deletes specified NDFS drive. 
 
 Parameters
 
    drive - drive to be deleted, e.g. 'S:'
    
 Returns
  
    Return code from NDFS
 
 Example
 
    drive = 'S:'
    rc = NdRxDetach( drive )
 

    
 ************************************************************************                                
 Function

    NdRxCreateMountPoint( path )
    
        Use this function to create a new mount point on a NDFS drive.
 
 Parameters
 
    path - full path name of the mount point drive to be created, 
           e.g. 'S:\FTPSERVER'
    
 Returns
  
    Return code from NDFS
 
 Example
 
    mountPoint = 'S:\FTPSERVER'
    rc = NdRxCreateMountPoint( mountPoint )
 
    

 ************************************************************************                                
 Function

    NdRxDeleteMountPoint( path )
    
        This function deletes an existing mount point from a NDFS drive. 
 
 Parameters
 
    path - full path name of the mount point to be deleted, 
           e.g. 'S:\FTPSERVER'
    
 Returns
  
    Return code from NDFS
 
 Example
 
    mountPoint = 'S:\FTPSERVER'
    rc = NdRxDeleteMountPoint( mountPoint )
 


 ************************************************************************                                
 Function

    NdRxMount(  type, dest, src [, flag ] )
    
        Use this function to mount a resource to an existing mount point
        on a NDFS drive. 
 
 Parameters
 
    type - type of mounted resource, 'local' or 'ftp'
    dest - mount point to mount the resource to, e.g. 'S:\FTPSERVER'
    src -  resource specific data, see 'readme' file for src parameter
           of ndmount utility 
    flag - mode 'R' = read, 'W' = write (default), note that this 
           parameter has not the same syntax as that of ndmount utility.
           
 Returns
  
    Return code from NDFS
 
 Example
 
    mountPoint = 'S:\OS2DIR'
    srcResource = 'C:\OS2'
    rc = NdRxMount( 'local', mountPoint, srcResource, 'W' )
 
    

 ************************************************************************                                
 Function

    NdRxUnmount(  path [, index ] )
    
        Use this function to unmount a resource from a mount point
        on a NDFS drive. 
 
 Parameters
 
    path - mount point that the resource 'index' should be unmounted 
           from, e.g. 'S:\FTPSERVER'
    index - index of the resource to be unmounted ( 0 - all )
            Index for a resource can be obtained by NdRxGetMount()
           
 Returns
  
    Return code from NDFS
 
 Example
 
    mountPoint = 'S:\FTPSERVER'
    rc = NdRxUnmount( mountPoint, 0 )
 
    

 ************************************************************************                                
 Function

    NdRxSetDriveInfo( drive [, units [, unitsavail ] ] )
    
        Use this function to set size of total and free space
        on a NDFS drive. 
 
 Parameters
 
    drive - drive info to be set to, e.g. 'S:'
    units - total 512 bytes blocks drive size, default = 64 meg
    unitsavail - free (available) 512 bytes blocks on drive, 
                 default = 64 meg
           
 Returns
  
    Return code from NDFS
 
 Example
 
    drive = 'S:'
    units = 128*1024*1024/512 /* 128 meg */
    unitsavail = 32*1024*1024/512 /* 32 meg */
    rc = NdRxSetDriveInfo( drive, units, unitsavail )
 


    
 ************************************************************************                                
 Function

    NdRxRefresh(  path )
    
        Use this function to refresh a cached directory.
        This function applicable to a directory on 'ftp' resource.
 
 Parameters
 
    path - directory to be refreshed
           
 Returns
  
    Return code from NDFS
 
 Example
 
    dir = 'S:\FTPSERVER\pub'
    rc = NdRxRefresh( dir )
 
    
    
 ************************************************************************                                
 Function

    NdRxQueryIFS()
    
        Use this function to query information from IFS.
 
 Parameters
 
    none
           
 Returns
 
    String which contains the following fields
    - return code from NDFS ( if not 0 then no further fields )
    - name of the IFS
    - version of the IFS as d.ddd
    - flag of NDCTL up and running ( 0 - NDCTL is not running )
    - pid of NDCTL ( 0 if NDCTL does not run )
    - completed requests
    - maximum allowed simultaneous requests
    - requests currently in process
    - maximum simultaneously requests in process
 
 Example
 
    say NdRxQueryIFS()
 
    
 ************************************************************************                                
 Function

    NdRxQueryCTL()
    
        Use this function to query information about NetDrive Control
    Program.
 
 Parameters
 
    none
           
 Returns
 
    String which contains the following fields
    - return code from NDFS ( if not 0 then no further fields )
    - flag of NDCTL up and running ( 0 - NDCTL is not running )
    - pid of NDCTL ( 0 if NDCTL does not run )
    - version of NDCTL as d.d.d.d
 
 Example
 
    say NdRxQueryCTL()
 
    
    
 ************************************************************************                                
 Function

    NdRxGetMount( path, infostem, mountpointstem, resourcestem )
    
        Use this function to query information on specified mount point.
 
 Parameters
 
    path - mount point which resources are to be queried
           
 Returns
 
    Return code from NDFS
    infostem.0 - exact name of found mountpoint
    infostem.1 - total child mountpoints
    infostem.2 - total resources mounted
    mountpointstem.0 - child mount points returned
    mountpointstem.i - names of child mount points, 
                       i = [1..mountpointstem.0]
    resourcestem.0 - resources returned
    resourcestem.i - resource information: type flags data,
                     i = [1..resourcestem.0]
                     'i' is the index of the resource 
 
 Example
 
    mountPoint = 'S:\'
    rc = NdRxGetMount( mountPoint, infostem, mountpointstem, resourcestem )
    say infostem.0
    say infostem.1
    say infostem.2
    say mountpointstem.0
    do i = 1 to mountpointstem.0
        say mountpointstem.i
    end
    say resourcestem.0
    do i = 1 to resourcestem.0
       say resourcestem.i
    end

[END OF FILE]
