shithub: 9intro

ref: 2b99422480d596ebc26921c87c6bb81a07949f3e
dir: /src/stat.c/

View raw version
#include <u.h>
#include <libc.h>

void
main(int , char* [])
{
	Dir*	d;

	d = dirstat("/NOTICE");
	if (d == nil)
		sysfatal("dirstat: %r");
	print("file name: %s\n", d->name);
	print("file mode: 0%o\n", d->mode);
	print("file size: %d bytes\n", d->length);
	free(d);
	exits(nil);
}