Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ dir(5) — HP-UX 5.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

fs(5)

inode(5)

directory(3C)

DIR(5)  —  Series 500 Implementation

NAME

dir − format of directories

SYNOPSIS

#include <types.h>
#include <sys/dir.h>

HP-UX COMPATIBILITY

Level: HP-UX/STANDARD

Origin: HP

Remarks: This entry describes the SDF directory format for Series 500.  Refer to other dir(5) manual pages for information valid for other implementations. 

DESCRIPTION

A directory behaves exactly like an ordinary file, except that no user may write into a directory.  The fact that a file is a directory is indicated by a bit in the flag word of its i-node entry (see inode(5)). The structure of a directory entry as given in sys/dir.h is:

#ifndefDIRSIZ
#defineDIRSIZ14
#endif
structdirect
{
chard_name[DIRSIZ+2]; /∗ 16-char file name ∗/
shortd_object_type;/∗ not referenced by HP-UX ∗/
shortd_file_code;/∗ not referenced by HP-UX ∗/
ino_td_ino;/∗ use fir # for i-node ∗/
};

The SDF directory implementation eliminates entries for .  and ...  Instead, this information is available as part of the i-node. 

File names are stored in directories in a special manner in two cases:

When a file name contains embedded blanks, the blanks are represented by null characters on the disc.  This is apparent when accessing the disc in raw (character) mode. 

When a file name is blank padded, all unspecified characters are set to blanks.  Again, this is apparent only when reading from the disc in raw mode. 

When a director has been opened vi open(2), file names appear as null-terminated, and contain embedded blanks where they belong.

The direct structure defined here is the actual directory format for the SDF file system, and is not compatible with other file systems supported on HP-UX.  The direct structure defined in /usr/include/ndir.h should be used in conjunction with the directory(3C) library routines for compatibility across all HP-UX supported file systems. 

SEE ALSO

fs(5), inode(5), directory(3C). 

Hewlett-Packard  —  last mod. May 11, 2021

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