dirent.h

来自「麻省理工学院的人工智能工具箱,很珍贵,希望对大家有用!」· C头文件 代码 · 共 50 行

H
50
字号
/*dirent.hdjlProvide UNIX compatibility*/#ifndef  _INC_DIRENT#define  _INC_DIRENT/* NT versions of readdir(), etc   From the MSDOS implementation   Directory entry size */#ifdef DIRSIZ#undef DIRSIZ#endif#define DIRSIZ(rp)  (sizeof(struct direct))/* needed to compile directory stuff*/#define DIRENT direct/* structure of a directory entry*/typedef struct direct {	long	d_ino;			/* inode number (not used by MS-DOS) */	int	d_namlen;		/* Name length */	char	d_name[257];		/* file name */} _DIRECT;/* structure for dir operations */typedef struct _dir_struc{	char	*start;			/* Starting position*/	char	*curr;			/* Current position*/	long	size;			/* Size of string table*/	long	nfiles;			/* number if filenames in table*/	struct direct dirstr;		/* Directory structure to return*/} DIR;DIR *opendir(char *filename);struct direct *readdir(DIR *dirp);long telldir(DIR *dirp);void seekdir(DIR *dirp,long loc);void rewinddir(DIR *dirp);int closedir(DIR *dirp);#endif /*_INC_DIRENT*/

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?