shithub: npe

ref: 5cade7073c5e1ed971b525e49c3c0dd43d6a9feb
dir: /libnpe/stat.c/

View raw version
#include <unistd.h>

#undef stat

int
stat9(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;
}