#include <iostream>
#include <assert.h>
#include <dirent.h>
using std::cout;
using std::cin;
using std::endl;
using std::string;
int main()
{
const size_t buf_size = 1024;
char dirbuf[buf_size];
assert(getcwd(dirbuf, buf_size) != NULL);
DIR* d = opendir(dirbuf);
assert(d != NULL);
struct dirent* entry;
while ((entry = readdir(d)) != NULL) {
cout << entry->d_reclen << endl;
cout << entry->d_type << endl;
cout << entry->d_name << endl;
}
return 0;
}