FD_STAT(3H) — Pixar Programmer’s Manual — libfd
NAME
fd_stat− obtain status of fast-disk file or directory
SYNOPSIS
#include <fd.h>
fd_stat(path, buf)
char ∗path;
struct fdstat ∗buf;
DESCRIPTION
Fd_stat returns information about the file or directory specified by path. Buf is a pointer to an fdstat structure, into which fd_stat returns information.
struct fdstat {
longfdst_mode; /∗ file type ∗/
fdoff_tfdst_size;/∗ file size in bytes ∗/
fdaddr_tfdst_daddr; /∗ starting block number of file within fs ∗/
longfdst_mtime; /∗ modification time ∗/
intfdst_uid;/∗ creator’s UID ∗/
};
/∗
∗ bit fields in fdst_mode
∗/
#define FDS_IFMT0xF0/∗ mask for file-type field ∗/
#define FDS_IFREG0x10 /∗ regular file ∗/
#define FDS_IFDIR0x20/∗ directory file ∗/
RETURN VALUE
A 0 value is returned if the operation succeeds; otherwise fd_stat returns -1 and the global variable errno indicates the reason for the failure.
ERRORS
[ENOTDIR] A component of the path prefix is not a directory.
[ENOENT] Path does not exist.
[EIO] An I/O error occurred while making the directory entry or allocating space.
SEE ALSO
Release β — Last change: 10/12/88