Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cddir(3) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cd

directory: opendir, readdir, telldir, seekdir, rewinddir, closedir



CDDIR(3,L)                  AIX Technical Reference                  CDDIR(3,L)



-------------------------------------------------------------------------------
cddir



PURPOSE

Provides access to CD ROM directories.

SYNTAX

#include <sys/types.h>
#include <dirent.h>
#include <cddir.h>

cddir *cdopendir (path)
char *path;

struct dirent *cdreaddir (dirp)
cddir *dirp;

struct cdextdir *cdreadext (dirp)
cddir *dirp;

void cdrewinddir (dirp)
cddir *dirp;

void cdclosedir (dirp)
cddir *dirp;

DESCRIPTION

The cddir subroutines provide access to the directory structures on a compact
disk, read-only memory (CD ROM) in the same fashion as the directory routines
do for normal files.  The CD ROM routines are distinct because a CD ROM is not
organized as a normal file system.  The routines may be linked with a C program
with the library option -lcd.

The cdopendir routine opens the CD ROM directory named by path and returns a
pointer to identify the directory for subsequent operations.

Directory entries may be read with either cdreadext or cdreaddir, depending on
the type of information required.  Successive calls read successive directory
entries.  cdreadext returns a pointer to a structure containing all information
associated with a CD ROM file directory entry, while cdreaddir returns a
pointer to a standard dirent structure.  cdreaddir is provided for ease in
converting code which currently uses the directory interface.  Calls to
cdreadext and cdreaddir may be freely intermixed.

Warning:  These routines return pointers to static data areas which are
overwritten by subsequent calls.




Processed November 7, 1990        CDDIR(3,L)                                  1





CDDIR(3,L)                  AIX Technical Reference                  CDDIR(3,L)



The cdextdir structure will change between phase 1 and phase 2 of development,
since it has not yet been used with extended attribute CD ROM records.

cdrewinddir resets the position in the indicated directory to the beginning.  A
subsequent cdreadext or cdreaddir returns information about the first directory
entry.

cdclosedir closes the indicated directory entry and releases associated
internal data structures.

FILES

/dev/cd0         default CD ROM device

/usr/lib/libcd.a CD ROM library

RELATED INFORMATION

In this book:  "cd" and "directory: opendir, readdir, telldir, seekdir,
rewinddir, closedir."



































Processed November 7, 1990        CDDIR(3,L)                                  2



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026