#include <../arch/arch.h>

char *strtype(file_type_t t)
{
	switch(t)
	{
		case file_type_reg: return "regular file";
		case file_type_blk_dev: return "block device";
		case file_type_chr_dev: return "char device";
		default: break;
	}
	return "unknown";
}

int main()
{
	vboolean ok;
	struct arch_dir_s dir;
	logStartConsoleLog();
	logUpperLevel(LOG_TRACE);
	for(ok = archFindFirst("/tmp",&dir);ok;ok = archFindNext(&dir))
		printf("Entry: '%s', dir: %d (%s)\n\n",dir.name,dir.is_dir,
			strtype(dir.ftype));
	archFindClose(&dir);
	return 0;
}
