#include <stdio.h>
#include <sys/types.h>
#include <dirent.h>

int main(void)
{
    DIR *dir;
    struct dirent *o;
    dir = opendir ("./");

    if (dir != NULL)
    {
        while ((o = readdir (dir)) != NULL)
        {
            printf("%s %d %llu\n", o->d_name, o->d_type, o->d_ino);
        }

        (void) closedir (dir);
    }
    else
    {
        perror ("Couldn't open the directory");
    }

    return 0;
}

 

相关文章:

  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-02-15
  • 2022-12-23
  • 2021-07-06
  • 2022-12-23
  • 2022-01-15
  • 2021-11-17
相关资源
相似解决方案