TinyDir
=======
[![Build Status](https://travis-ci.org/cxong/tinydir.svg?branch=master)](https://travis-ci.org/cxong/tinydir)[![Project Stats](https://www.openhub.net/p/tinydir/widgets/project_thin_badge.gif)](https://www.openhub.net/p/tinydir)
Lightweight, portable and easy to integrate C directory and file reader. TinyDir wraps dirent for POSIX and FindFirstFile for Windows.
Example
=======
There are two methods. Error checking omitted:
```C
tinydir_dir dir;
tinydir_open(&dir, "/path/to/dir");
while (dir.has_next)
{
tinydir_file file;
tinydir_readfile(&dir, &file);
printf("%s", file.name);
if (file.is_dir)
{
printf("/");
}
printf("\n");
tinydir_next(&dir);
}
tinydir_close(&dir);
```
```C
tinydir_dir dir;
int i;
tinydir_open_sorted(&dir, "/path/to/dir");
for (i = 0; i < dir.n_files; i++)
{
tinydir_file file;
tinydir_readfile_n(&dir, &file, i);
printf("%s", file.name);
if (file.is_dir)
{
printf("/");
}
printf("\n");
}
tinydir_close(&dir);
```
See the `/samples` folder for more examples, including an interactive command-line directory navigator.
Language
========
ANSI C, or C90.
Platforms
=========
POSIX and Windows supported. Open to the possibility of supporting other platforms.
Links
=====
Available Archlinux AUR package : https://aur.archlinux.org/packages/tinydir-git/
License
=======
Simplified BSD.
Known Limitations
=================
- Not threadsafe
- Limited path and filename sizes
- No wide char support
OpenCV实现多目三维重建
5星 · 超过95%的资源 需积分: 48 129 浏览量
2016-04-24
14:49:39
上传
评论 77
收藏 37.57MB ZIP 举报
aipiano
- 粉丝: 1266
- 资源: 6
最新资源
- Python闭包:深入理解与应用场景解析.zip
- Win64OpenSSL-3-3-0.exe
- 课高分程设计-基于C++实现的民航飞行与地图简易管理系统-南京航空航天大学
- 航天器遥测数据故障检测系统python源码+文档说明+数据库(课程设计)
- 北京航空航天大学操作系统课设+ppt+实验报告
- 基于Vue+Echarts实现风力发电机中传感器的数据展示监控可视化系统+源代码+文档说明(高分课程设计)
- 基于单片机的风力发电机转速控制源码
- 基于C++实现的风力发电气动平衡监测系统+源代码+测量数据(高分课程设计)
- 毕业设计- 基于STM32F103C8T6 单片机,物联网技术的太阳能发电装置+源代码+文档说明+架构图+界面截图
- 基于 LSTM(长短期记忆)(即改进的循环神经网络)预测风力发电厂中风力涡轮机产生的功率+源代码+文档说明
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
- 1
- 2
- 3
- 4
- 5
- 6
前往页