c代码读取目录信息
2024-09-24 23:53:19
#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;
}
最新文章
- wget 显示";英国中部时间";,去掉烦人的刷屏显示
- Hibernate参数一览表
- 写给喜欢用Block的朋友(ios Block)
- Python Base HTTP Server
- UITabelView 高级(自定义Cell)
- SQL对like 操作中的特殊字符处理方法
- 【C语言】函数和自定义函数
- (十)Hibernate 查询方式
- 趣解curl
- css3响应式布局
- HashMap工作原理
- 谈论Java原子变量和同步的效率 -- 颠覆你的生活
- fetch()的用法
- bzoj 4345: [POI2016]Korale
- winform打开本地html页面
- [bzoj4881][Lydsy2017年5月月赛]线段游戏
- appium 3 跑起来
- 浅析data:image/png;base64的应用
- css基本语法及页面引用
- python--接口开发
热门文章
- eclipse不能新建server
- canvas关于getImageData跨域问题解决方法
- 如何对web.config进行加密和解密
- 05:统计单词数【NOIP2011复赛普及组第二题】
- ThinkPhp单字母函数
- LeetCode---Binary Search
- LeetCode----Array
- 创建COM对象时遭遇 800702e4
- C# List 的一些操作 (两List元素是否想同,List是否包含在另一个List中)
- Add Digits, Maximum Depth of BinaryTree, Search for a Range, Single Number,Find the Difference