shithub: 9intro

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