FD_CREATE(3H) — Pixar Programmer’s Manual — libfd
NAME
fd_create− create a new file on the fast-disk system
SYNOPSIS
#include <fd.h>
fd_create(name, size, mode)
char ∗name;
fdoff_t size;
int mode;
DESCRIPTION
Fd_create creates a new file or prepares to rewrite an existing file called name, given as the address of a NUL-terminated string. If the file did not exist, it is created. The argument mode is reserved for future implementations and should be set to zero by current applications.
The file is also opened for writing, and its file descriptor is returned.
RETURN VALUE
The value −1 is returned if an error occurs. Otherwise, the call returns a non-negative descriptor that only permits writing.
ERRORS
Fd_create will fail and the file will not be created in the following cases:
[ENOTDIR] A component of the path prefix is not a directory.
[ENOENT] The named file does not exist.
[EISDIR] The name argument specifies an existing directory.
[EROFS] Name resides in a read-only Fast-Disk filesystem.
[ENOSPC] There exists no contiguous extent of free disk blocks large enough to accommodate the space demanded by the size argument.
[EIO] An I/O error occurred while making the directory entry or allocating space.
[ENOMEM] No memory was available in the user’s process to allocate various resources.
SEE ALSO
fd_open(3H), fd_write(3H), fd_close(3H), fd(5)
Release β — Last change: 10/12/88