shithub: npe

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