shithub: npe

ref: 742736e50d97306ad16853d18c977b502cf35b82
dir: /libnpe/utime.c/

View raw version
#include <utime.h>

int
utime(const char *path, const struct utimbuf *times)
{
	Dir d;

	nulldir(&d);
	if(times == nil)
		d.atime = d.mtime = time(nil);
	else{
		d.atime = times->actime;
		d.mtime = times->modtime;
	}
	return dirwstat(path, &d);
}