shithub: npe

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