ref: b6a5e7f9af746f6459a01a480564839ff3a35c6c
dir: /libnpe/stat.c/
#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; }