FD_RENAME(3H) — Pixar Programmer’s Manual — libfd
NAME
fd_rename− change the name of a file on the Fast-Disk
SYNOPSIS
fd_rename(from, to)
DESCRIPTION
Fd_rename changes the name of the file from to be the name to. If a file named to already exists, it is first removed. Both from and to must reside on the same filesystem.
RETURN VALUE
A 0 value is returned if the operation succeeds; otherwise fd_rename returns -1 and the global variable errno indicates the reason for the failure.
ERRORS
Fd_rename will fail and neither of the argument files will be affected if any of the following is true:
[ENOTDIR] A component of either path prefix is not a directory.
[ENOENT] A component of the from path does not exist, or a path prefix of to does not exist.
[EISDIR] To specifies an existing directory.
[EXDEV] The names from and to reference different Fast-Disk filesystems.
[ENOSPC] The directory into which the to name will be placed must grow to accommodate the new name, and there are no free disk blocks available to do this.
[EROFS] The requested operation requires modification of a read-only filesystem.
[EINVAL] From is a parent directory of to.
[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
Release β — Last change: 10/18/88