加入收藏
举报
02-14 20:02
#0
文件名称:
ftw-h.md
所在目录:
Openharmony v1.0 / docs / api / api-SmartVision-Devices
文件大小:
9.46 KB
下载地址:
fenwii/OpenHarmony
   
免责声明:本网站仅提供指向 GitHub 上的文件的链接,所有文件的版权归原作者所有,本网站不对文件内容的合法性、准确性或安全性承担任何责任。
文本预览:
# ftw.h
## **Overview**
**Related Modules:**
[FS](FS.md)
**Description:**
Provides functions and structures related to file tree traversal.
You can use the functions and structures to traverse files in a specified directory to obtain or process related information.
**Since:**
1.0
**Version:**
1.0
## **Summary**
## Data Structures









Data Structure Name


Description


FTW


Defines the file tree walker (FTW).



## Macros







































Macro Name and Value


Description


FTW_F   1


Regular file.


FTW_D   2


Directory.


FTW_DNR   3


Unreadable directory. Its subdirectories will not be traversed.


FTW_NS   4


The data of the stat structure cannot be obtained. The possible cause is that the permission is incorrect.


FTW_SL   5


Symbolic link.


FTW_DP   6


 

FTW_SLN   7


Symbolic link that names a non-existent file.


FTW_PHYS   1


Symbolic links that are not traversed. If not set, symbolic links are traversed by default.


FTW_MOUNT   2


Stay within the same file system.


FTW_CHDIR   4


chdir is called to go to the directory before reading the directory.


FTW_DEPTH   8


All subdirectories will be traversed before the directory itself.



## Functions












Function Name


Description


ftw (const char *path, int(*fn)(const char *file, const struct stat *sb, int flag), int depth)


int 


Traverses a file tree.


nftw (const char *path, int(*fn)(const char *file, const struct stat *sb, int flag, struct FTW *s), int fd_limit, int flags)


int 


Traverses a file tree.


点赞 回复
回帖
支持markdown部分语法 ?