findx.h

来自「如何制作ramdisk的一个好资料」· C头文件 代码 · 共 55 行

H
55
字号
#ifndef _FINDX_H
#define _FINDX_H


/*************************************************************
Function : RD_findfirst
Description:
	find the first file that match the requirement
Input:
	target - a wildcard that specifies the directory and files to search
	ffres - a structure to hold the results of the search
	attrib - the target attribute
Output:
	0	if a match has been found
	-1	if the searching failed
**************************************************************/
int RD_findfirst(unsigned char *target, struct ffblk *ffres, int attrib);
int RD_findfirst_r(unsigned char *target, struct ffblk *ffres, int attrib);



/*************************************************************
Function : RD_findnext
Description:
	find the next file that match the requirement
Input:
	ffres - a structure to hold the results of the search
Output:
	0	if a match has been found
	-1	if the searching failed
**************************************************************/
int RD_findnext(struct ffblk *ffres);
int RD_findnext_r(struct ffblk *ffres);



/*************************************************************
Function : RD_findclose
Description:
	clean up the memory occupied by the previous search
Input:
	ffres - a structure that holds the results of the previous search
Output:
	0	SUCCESS
	-1	FAILURE
**************************************************************/
int RD_findclose(struct ffblk *ffres);



/******************[Internal functions]***********************/
int RD_nameCompare(unsigned char *wild, unsigned char *name);

#endif

⌨️ 快捷键说明

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