Files
oldlinux-files/Minix/2.0.0/wwwman/man5/dir.5.html
2024-02-19 00:21:39 -05:00

72 lines
1.5 KiB
HTML

<HTML>
<HEAD>
<TITLE>dir(5)</TITLE>
</HEAD>
<BODY>
<H1>dir(5)</H1>
<HR>
<PRE>
</PRE>
<H2>NAME</H2><PRE>
dir - directory layout
</PRE>
<H2>SYNOPSIS</H2><PRE>
<STRONG>#include</STRONG> <STRONG>&lt;sys/types.h&gt;</STRONG>
<STRONG>#include</STRONG> <STRONG>&lt;sys/dir.h&gt;</STRONG>
</PRE>
<H2>DESCRIPTION</H2><PRE>
The directories of the V1 and V2 file systems are arrays of the following
structure defined in &lt;sys/dir.h&gt;:
struct direct {
ino_t d_ino; /* I-node number */
char d_name[14]; /* Name of up to 14 characters */
};
The <STRONG>d_ino</STRONG> field is the inode number of the file named by <STRONG>d_name</STRONG>. <STRONG>D_ino</STRONG>
is zero if the directory slot isn't allocated. This number is the same
as <STRONG>st_ino</STRONG> returned by <STRONG><A HREF="../man2/stat.2.html">stat(2)</A></STRONG> unless the entry is mounted on. <STRONG>D_name</STRONG> is
the name of up to 14 characters, null-terminated only if less then 14 in
length. Any character other than null or '<STRONG>/</STRONG>' is allowed.
See <STRONG><A HREF="../man3/directory.3.html">directory(3)</A></STRONG> for a portable way to access directories, Minix is
probably the last system with these old V7 format directories.
</PRE>
<H2>SEE ALSO</H2><PRE>
<STRONG><A HREF="../man3/directory.3.html">directory(3)</A></STRONG>.
</PRE>
<H2>AUTHOR</H2><PRE>
Kees J. Bot (kjb@cs.vu.nl)
</PRE>
</BODY>
</HTML>