*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> dirent (4)              
Title
Content
Arch
Section
 

Contents


DIRENT(4)							     DIRENT(4)


NAME    [Toc]    [Back]

     dirent, dirent64 -	file system independent	directory entry

SYNOPSIS    [Toc]    [Back]

     #include <sys/dirent.h>

DESCRIPTION    [Toc]    [Back]

     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(2) system
     call.

     The dirent	structure is defined below.

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


     The d_ino is a number which is unique for each file in the	file system.
     The field d_off is	an opaque offset (i.e.,	not necessarily	in bytes) of
     the next directory	entry in the actual file system	directory.  The	field
     d_name 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 d_reclen 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 it will always
     result in the next	entry being properly aligned.

     The dirent64 structure differs from the dirent structure in the types of
     the d_ino and d_off fields. d_ino is a ino64_t and	d_off is an off64_t.
     The dirent64 structure is used with the getdents64, ngetdents64,
     readdir64,	telldir64, and seekdir64 calls.

SEE ALSO    [Toc]    [Back]

      
      
     directory(3C), getdents(2).


									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
getdents FreeBSD get directory entries in a file system independent format
getdirentries FreeBSD get directory entries in a file system independent format
getdirentries Tru64 Get directory entries in a file-system independent format.
getdents IRIX read directory entries and put in a file system independent format
unlink HP-UX remove directory entry; delete file
unlink Tru64 Creates an additional directory entry for an existing file
link Tru64 Creates an additional directory entry for an existing file
getdents NetBSD get directory entries in a filesystem independent format
getdirentries Linux get directory entries in a filesystem independent format
getdirentries OpenBSD get directory entries in a filesystem independent format
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service