.hy 0 .ad l .br

Prev, Top | Notes, Next

# Using the Library

.nf

    if (rename(old_path, new_path) < 0)
    {
        int err = errno;
        ...error recovery...
        fprintf(stderr, "rename %s %s: %s\en",
            old_path, new_path, strerror(err));
        exit(1);
    }
    if (rename(old_path, new_path) < 0)
    {
        int err = errno;
        ...error recovery...
        fprintf(stderr, "%s\en",
            explain_errno_rename(err, old_path,
                new_path));
        exit(1);
    }