direntry.3
changeset 0 068428edee47
equal deleted inserted replaced
-1:000000000000 0:068428edee47
       
     1 .TH direntry 3
       
     2 .SH NAME
       
     3 direntry \- read directory entries
       
     4 .SH SYNTAX
       
     5 .B #include <direntry.h>
       
     6 
       
     7 DIR *\fBopendir\fP(\fIfn\fR);
       
     8 
       
     9 struct direntry *\fBreaddir\fP(\fIdir\fP);
       
    10 
       
    11 void \fBclosedir\fP(\fIdir\fP);
       
    12 
       
    13 DIR *\fIdir\fR;
       
    14 .br
       
    15 char *\fIfn\fR;
       
    16 .SH DESCRIPTION
       
    17 The point of
       
    18 .B direntry.h
       
    19 is to provide a uniform interface to BSD's
       
    20 .B sys/dir.h
       
    21 and POSIX's
       
    22 .BR dirent.h .
       
    23 
       
    24 The
       
    25 .B readdir
       
    26 interface is highly unsatisfactory.
       
    27 It does not distinguish between I/O errors and end-of-directory.
       
    28 It uses
       
    29 .BR malloc .
       
    30 The return type for
       
    31 .B closedir
       
    32 varies: some implementations return the
       
    33 .B close
       
    34 return value.
       
    35 .SH "SEE ALSO"
       
    36 readdir(3)