⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 findx.h

📁 嵌入式系统中文件系统源代码
💻 H
字号:
#ifndef _FAT_FINDX_H
#define _FAT_FINDX_H


/*************************************************************
Function : FAT_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 FAT_findfirst(unsigned char *target, struct ffblk *ffres, int attrib);
int FAT_findfirst_r(unsigned char *target, struct ffblk *ffres, int attrib);



/*************************************************************
Function : FAT_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 FAT_findnext(struct ffblk *ffres);
int FAT_findnext_r(struct ffblk *ffres);



/*************************************************************
Function : FAT_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 FAT_findclose(struct ffblk *ffres);


/******************[Internal functions]***********************/

int nameCompare(unsigned char *wild, unsigned char *name, char unicode);
void getShortName(unsigned char *dir, unsigned char *name);
void copyName(unsigned char *source, unsigned char *dest, char unicode);

#endif

⌨️ 快捷键说明

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