shithub: npe

ref: ba4b0723d9e6d6ec72ca54016a932e72fbae46f7
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;
}