TABLE OF CONTENTS

cdrom.library/CDExamine
cdrom.library/CDExNext
cdrom.library/GetBlock
cdrom.library/GetDiskType
cdrom.library/GetExtAttRec
cdrom.library/GetVD
cdrom.library/CDExamine                               cdrom.library/CDExamine

   NAME

       CDExamine -- CD-Rom version of Examine().


   SYNOPSIS

       Result = CDExamine(Lock,CDFib)
         D0                A0   A1

       LONG CDExamine(BPTR Lock,struct CDFileInfoBlock *CDFib)


   FUNCTION

       CDExamine() fills in information in the CDFileInfoBlock concerning
       the file or directory associated with the lock.


   INPUTS

       Lock    - a BCPL pointer to a FileLock.
       CDFib   - a pointer to a CDFileInfoBlock.(must be longword aligned)


   RESULT

       Result  - DOSTRUE for success, or DOSFALSE for failure.
               - IOErr() contains secondary error code.


   NOTES

       CDFileInfoBlock MUST be longword aligned.


   BUGS

       NONE


   SEE ALSO

       CDExNext(),dos.library/Examine(),dos.library/ExNext(), LibTest.c

cdrom.library/CDExNext                                 cdrom.library/CDExNext

   NAME

       CDExNext -- CD-Rom version of ExNext().


   SYNOPSIS

       Result = CDExNext(Lock,CDFib)
         D0               A0   A1

       LONG CDExNext(BPTR Lock,struct CDFileInfoBlock *CDFib)


   FUNCTION

       This routine is passed a directory lock and a CDFileInfoBlock that
       have been initialized by a previous call to CDExamine(), or updated
       by a previous call to CDExNext.  CDExNext gives a return code of zero
       on failure.  The most common cause of failure is reaching the end
       of the list of files in the owning directory.  In this case, IoErr
       will return ERROR_NO_MORE_ENTRIES and a good exit is appropriate.

       So, follow these steps to examine a directory:

       1) Pass a Lock and a CDFileInfoBlock to CDExamine().  The Lock must
          be on the directory you wish to examine.

       2) Pass CDExNext the same Lock and CDFileInfoBlock.

       3) Do something with the information returned in the CDFileInfoBlock.
          Note that the type field is positive for directories and negative
          for files.

       4) Keep calling CDExNext until it returns FALSE.  Check IoErr() to
          ensure that the reason for failure was ERROR_NO_MORE_ENTRIES.


   INPUTS

       Lock    - a BCPL pointer to a FileLock.
       CDFib   - a pointer to a CDFileInfoBlock.(must be longword aligned)


   RESULT

       Result  - DOSTRUE for success, or DOSFALSE for failure.
               - IOErr() contains secondary error code.


   NOTES

       CDFileInfoBlock MUST be longword aligned.

       If you wish to recursively scan the file tree and you find
       another directory while CDExNext'ing, you must Lock that directory
       and CDExamine() it using a new CDFileInfoBlock.  Use of the same
       CDFileInfoBlock to enter a directory would lose important state
       information, such that it will be impossible to continue scanning
       the parent directory.

       It is NOT legal to CDExamine() a FILE, and then CDExNext() from
       that CDFileInfoBlock.


   BUGS

       NONE


   SEE ALSO

       CDExamine(),dos.library/Examine(),dos.library/ExNext(), LibTest.c

cdrom.library/GetBlock                                 cdrom.library/GetBlock

   NAME

       GetBlock -- Reads a Block from the CD-Rom drive.


   SYNOPSIS

       Result = GetBlock(lock,buffer,block,num)
         D0               A0    A1     D0   D1

       LONG GetBlock(BPTR lock, UBYTE *buffer, LONG block, LONG num)


   FUNCTION

       This function will retrieve the contents of any valid block on the
       CD Disc and place it directly into the user supplied buffer.


   INPUTS

       lock    - A BCPL pointer to a FileLock.  This is typically the lock
                 on the root of the CD volume, but may be any valid lock for
                 the Disc containing the required block.
       buffer  - UBYTE pointer to user allocated buffer.
       block   - The block number of the device/volume.
       num     - The number of blocks you want transferred.


   RESULT

       Result  - DOSTRUE for success, or DOSFALSE for failure.


   NOTES

       The buffer must be allocated by the user and must be a multiple of
       CDBLOCKSIZE (2048 bytes).  The caller is required to guarentee that
       the buffer is large enough to hold the number of blocks requested.

       This is a low level function, and as such the application programmer
       is expected to know what he is doing with this routine.


   BUGS

       NONE


   SEE ALSO

       LibTest.c

cdrom.library/GetDiskType                           cdrom.library/GetDiskType

   NAME

       GetDiskType -- Find out what File System is implemented.


   SYNOPSIS

       Result = GetDiskType(lock)
         D0                  A0

       LONG GetDiskType(BPTR lock)


   FUNCTION

       This function will request the file system to return the type
       of disk currently in the drive.


   INPUTS

       lock    - This is a BCPL pointer to a FileLock.  Typically this is
                 a lock on the root of the volume/device.


   RESULT

       Result  - Return values are in CDROM/CDExtens.h and DOS/dos.h.

                 HSG  - HiSierraGroup.
                 ISO  - ISO9660.
                 CDDA - Compact Disc Digital Audio.

                 Also, any of the valid AmigaDOS types may be returned
                 as well, ie BAD,NDOS etc.


   NOTES

       NONE


   BUGS

       NONE


   SEE ALSO

       CDROM/CDExtens.h, DOS/dos.h, LibTest.c


cdrom.library/GetExtAttRec                         cdrom.library/GetExtAttRec

   NAME

       GetExtAttRec -- Retreive an EAR

   SYNOPSIS

       Result = GetExtAttRec(lock, buffer, NumBlocks)
         D0                   A0     A1       D0

       LONG GetExtAttRec(BPTR lock, UBYTE *buffer, LONG NumBlocks)


   FUNCTION

       This function is used to obtain an Extended Attribute Record for

       either a file or a directory.


   INPUTS

       lock      - This is a BCPL pointer to a FileLock.  Typically this
                   is the file or directory lock.

       buffer    - UBYTE pointer to user allocated buffer.

       NumBlocks - UBYTE pointer to user allocated buffer.


   RESULT

       BOOLEAN   - TRUE or FALSE


   EXAMPLE



   NOTES

       User must ensure that the supplied buffer is large enough to hold
       the entire EAR.

       This is a low level function, and as such the application programmer
       is expected to know what he is doing with this routine.


   BUGS



   SEE ALSO

       LibTest.c

cdrom.library/GetVD                                       cdrom.library/GetVD

   NAME

       GetVD -- Obtain a Volume Descriptor


   SYNOPSIS

       Result = GetVD(lock,buffer,type,instance)
         D0            A0    A1    D0     D1

       LONG GetVD(BPTR lock, UBYTE *buffer, LONG type, LONG instance)


   FUNCTION

       GetVD will attempt to locate a Volume Descriptor of the type
       specified, on the volume of the supplied lock.

       The first Descriptor which matches the type requested will be loaded
       into the supplied buffer.

       If a match is not found, no data will be transfered.


   INPUTS

       lock    - A BCPL pointer to a FileLock.  This is typically the lock
                 on the root of the CD volume, but may be any valid lock for
                 the volume.

       buffer  - UBYTE pointer to user allocated buffer.

       type    - The type of descriptor requested.  Values are defined in
                 CDROM/CDExtens.h

                 BOOT  PRIMARY  SUPPLEMEMTARY  PARTITION  TERMINATING

       instance- This is the actual instance of the descriptor required.
                 You MUST specify the instance.  A value of 1 is the minimun
                 value for this parameter.


   RESULT

       Result  - DOSTRUE for success, or DOSFALSE for failure.
               - IOErr() will contain the secondary code.


   NOTES

       The buffer must be allocated by the user and must be
       CDBLOCKSIZE (2048 bytes).

       This is a low level function, and as such the application programmer
       is expected to know what he is doing with this routine.

       Only the first 256 Volume Descriptors are scanned.


   BUGS

       NONE


   SEE ALSO

       LibTest.c

