shithub: npe

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