shithub: npe

ref: e8d44e6791e9568d0a4e3291d15692f9223870f1
dir: /libnpe/rename.c/

View raw version
#include <unistd.h>

int
rename(char *old, char *new)
{
	Dir d;

	nulldir(&d);
	d.name = new;

	return dirwstat(old, &d) > 0 ? 0 : -1;
}