Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ dirent(0) — CLIX 3.1r7.6.28

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getdents(2)



  dirent(0)                           CLIX                           dirent(0)



  NAME

    dirent - File system independent directory entry

  SYNOPSIS

    #include <sys/types.h>

    #include <sys/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 common to directory entries in different file system
    types.  A set of these structures is returned by the getdents() function.

    The dirent structure is defined below.

    struct dirent {
         long           d_ino;
         off_t          d_off;
         unsigned short d_reclen;
         char           d_name[1];
    };

    The members of this structure are as follows:

    d_ino      A number that is unique to each file in the file system.

    d_off      The offset of the directory entry in the actual file system
               directory.

    d_name     The beginning of the character array giving the name of the
               directory entry.  This name is null terminated and may have at
               most MAXNAMLEN (defined in the <dirent.h> file) characters.
               This results in file system independent directory entries being
               variable-length entities.

    d_reclen   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 it will always result in the next entry being on a long
               boundary.

  RELATED INFORMATION

    Functions:  getdents(2)







  2/94 - Intergraph Corporation                                              1




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