shithub: npe

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