aboutsummaryrefslogtreecommitdiff
path: root/unix/os/doc/zopdir.hlp
blob: 6df42214043b89da2a918f09b008b0f659972d43 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
.help zopdir May84 "System Interface"
.ih
NAME
zopdir -- open a directory file
.ih
SYNOPSIS
.nf
zopdir (osfn, chan)

packed	char osfn[]		# directory file name
int	chan			# channel assigned to file
.fi
.ih
DESCRIPTION
The named directory file is opened for sequential access in READ_ONLY mode.
.ih
RETURN VALUE
ERR is returned in \fIchan\fR if the named file does not exist, is not a
directory, or cannot be accessed.  A positive nonzero magic integer is
returned if the operation is successful.
.ih
NOTES
A directory file is opened at the kernel level with \fBzopdir\fR,
is read with \fBzgfdir\fR, and is closed with \fBzcldir\fR.
A directory file is viewed by the high level code as a simple list of
OS filenames; a directory file is interfaced to FIO as a text file and
successive filenames are read by the high level code with \fBgetline\fR.
The text file driver for a directory file is machine independent and
serves only as an interface between FIO and the three directory access
primitives.
.ih
SEE ALSO
zgfdir, zcldir
.endhelp