Prev, Top Notes, Next

Strange and Interesting System Calls
rename(2)

Analogous to renaming files over files, you can rename directories over empty directories.
rename(oldpath = "foo", newpath = "bar") failed, Not a directory (20, ENOTDIR) because oldpath is a directory, but newpath is a regular file, not a directory