shithub: npe

ref: 16bd4782f88ee554cba6c749a632c1c2296369d3
dir: /libnpe/stat.c/

View raw version
#include <unistd.h>

#undef stat

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

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

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

	return 0;
}