shithub: npe

ref: ea4e9e55d8fd27607c4204416d4c3a36370ff359
dir: /libnpe/stat.c/

View raw version
#include <unistd.h>

#undef stat

int
npe_stat(char *filename, struct stat9 *buf)
{
	Dir *d;

	if((d = dirstat(filename)) == nil)
		return -1;

	buf->st_size = d->length;
	buf->st_mode = d->mode;
	free(d);

	return 0;
}