Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Book 4-Appendices - <b>nnetmap()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 NNETMAP()
 Maps and unmaps drives
------------------------------------------------------------------------------
 Syntax

     NNETMAP([<cDrive>],[<cPath>],[<lFake>],[<lTemp>]
        [<lInsert>]) --> lSuccess

     Netware: 2.2 and 3.11

 Arguments

     <cDrive>  Designates the drive that is mapped or unmapped.  Valid
     identifiers are "A" to "Z" and "S1" to "S16" (search drives).  When
     called without this parameter, the function uses the current drive.

     <cPath>  Designates the path on a server volume that is assigned to
     <cDrive>.  This parameter must be passed if a drive is mapped.  When
     called without <cPath>, NNETMAP() deletes a mapping for <cDrive>.

     <lFake>  Designates whether <cPath> is created as fake root (.T.) or
     not (.F.).  The default value (.F.) designates that <cPath> is not a
     fake root..

     <lTemp>  Designates whether the mapping is permanent (.F.) or
     temporary (.T.).  The default value is .F..

     <lInsert>  Designates whether the mapped search drive (S1 to S16)
     replaces an existing search drive (.F.) or is inserted on the position
     before the old entry (.T.).  This parameter is only important if
     <cDrive> is a search drive.  The default value is .F..

 Returns

     NNETMAP() returns .T. if the operation has been successful.

 Description

     NOVELL NET MAP
     NNETMAP() allows you to map or unmap drives and search drives within an
     application.  If NNETMAP() is called with only the <cDrive> parameter,
     the mapping for the drive is deleted.

     To map a drive, NNETMAP() must be called with the arguments <cDrive> and
     <cPath>.  The path can contain a local drive designator, path, server
     name, volume name, and already mapped drives as well as search drives.
     The default mapping is permanent which means that the mapping continues
     after the application that created the mapping terminates.  If the
     mapping is terminated with the application, the parameter <lTemp> must
     be set to .T..

     The directory <cPath> becomes the root of <cDrive> if the parameter
     <lFake> is set to .T..

     NNETMAP() allows you to create search drives.  Up to 16 search drives,
     "S1" to "S16" can be addressed.  If a search drive is created (Sn,
     n=1..16), NNETMAP() determines the first available drive designator with
     a descending search that starts with "Z".  If no designator is
     available, NNETMAP() cannot perform the allocation and returns .F..  If
     a designator is available, <cPath> is mapped to the drive designator and
     the drive is set on position n in the path environment variable.  The
     previous entry in the path variable is replaced.  If <lInsert> is set to
     .T., the drive  designator is placed before position n in the path list.
     To delete the mapping for a search drive, <cDrive> can be passed either
     with the search drive (S1 to S16) or the drive designator.  The drive
     designator is removed from the path variable.

 Notes

     .  Fake roots require Novell shell version 3.01 or higher.  If
        version 3.01 or higher is not available, the attempt to map a fake
        root fails (<cFake>=.T.) and NNETMAP() returns .F..

     .  You cannot add a new search drive if the path environment
        variable already contains 16 entries.

     .  Do not create temporary search drives because the drive
        mapping is canceled in the program; the invalid drive designator is
        not removed from the path variable.

 Examples

     .  Map drive L: to directory PUBLIC on server NANGERTOOLS2,
        volume SYS:

        ? NNETMAP('L','NANGERTOOLS2/SYS:PUBLIC')

     .  Map directory ABC to the next available drive designator,
        starting from drive L:

        ? NNETMAP(NNETNXTFRE(),'L:ABC')

     .  Create directory SYS:DATA as a permanent search drive on the
        current server, and insert the search drive on position 5 in the path
        variable.  The directory becomes the root for the new drive:

        ? NNETMAP('S5','SYS:DATA',.T.,,.T.)

     .  Terminate the mapping for drive K:

        NNETMAP('K')

     .  If K: was a search drive, it is removed from the PATH
        variable.

See Also: NNETNXTFRE() NNETMAPINF()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson