shithub: npe

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