Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ dirent(4) — NEWS-os 5.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getdents(2)



dirent(4)                                               dirent(4)



NAME
     dirent - file system independent directory entry

SYNOPSIS
     #include <dirent.h>

DESCRIPTION
     Different file system types  may  have  different  directory
     entries.    The  dirent  structure  defines  a  file  system
     independent directory entry, which contains information com-
     mon  to directory entries in different file system types.  A
     set of these structures is returned by the getdents(2)  sys-
     tem call.

     The dirent structure is defined below.

          struct  dirent {
                  inot            dino;
                  offt            doff;
                  unsigned short   dreclen;
                  char             dname[1];
          };

     The dino is a number which is unique for each file  in  the
     file  system.   The field doff is the offset of that direc-
     tory entry in the actual file system directory.   The  field
     dname  is  the  beginning of the character array giving the
     name of the directory entry.  This name is  null  terminated
     and  may have at most MAXNAMLEN characters.  This results in
     file system independent  directory  entries  being  variable
     length entities.  The value of dreclen is the record length
     of this entry.  This length is defined to be the  number  of
     bytes  between  the  current entry and the next one, so that
     the next structure will be suitably aligned.

SEE ALSO
     getdents(2)


















                                                                1



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