1 ..TH DIRECTORY 3 "OGC Revision 8/02/82"
2 .TH DIRECTORY 3X 8/1/82
5 opendir, readdir, telldir, seekdir, rewinddir, closedir \- flexible length directory operations
47 The purpose of this library is to simulate
48 the new flexible length directory names of 4.2bsd Unix
49 on top of the old directory structure of 4.1bsd.
50 It allows programs to be converted immediately
51 to the new directory access interface,
52 so that they need only be relinked
53 when 4.2bsd becomes available.
56 opens the directory named by
62 returns a pointer to be used to identify the
64 in subsequent operations.
70 cannot be accessed or is not a directory.
73 returns a pointer to the next directory entry.
76 upon reaching the end of the directory or detecting
82 returns the current location associated with the named
86 sets the position of the next
90 The new position reverts to the one associated with the
94 operation was performed.
97 are good only for the lifetime of the DIR pointer from
98 which they are derived.
99 If the directory is closed and then reopened,
102 value may be invalidated
103 due to undetected directory compaction.
104 It is safe to use a previous
106 value immediately after a call to
108 and before any calls to
112 resets the position of the named
114 to the beginning of the directory.
120 and the structure associated with the DIR pointer to be freed.
122 See /usr/include/dir.h for a description of the fields available in
124 The preferred way to search the current directory for entry "name" is:
131 for (dp = readdir(dirp); dp != NULL; dp = readdir(dir))
133 if (dp->d_namlen == len && !strcmp(dp->d_name, name)) {
145 This library is accessed by specifying "-lndir" as the
146 last argument to the compile line, e.g.:
149 cc -o prog prog.c -lndir
158 Report problems to mckusick@berkeley or ucbvax!mckusick.