fat.h

来自「一个小型的FAT文件系统,支持FAT12/16和目录」· C头文件 代码 · 共 32 行

H
32
字号


#ifndef _FAT_H
#define	_FAT_H

#include	"filesys.h"

#define	SECTOR_SIZE		512

int FATInit(char driveNum);
int FATCreate(UCHAR driveNum, const UCHAR *path);
int FATOpen(UCHAR driveNum, const UCHAR *path, int mode);
int FATClose(int fd);
int FATRead(UCHAR *buf, int len, int fd);
int FATWrite(const UCHAR *buf, int len, int fd);
int FATFlush(int fd);
int FATRemove(UCHAR driveNum, const UCHAR *path);
int FATRename(UCHAR driveNum, const UCHAR *oldname, const UCHAR *newname);
int FATSeek(int fd, long offset, int origin, long *position);
int FATSetAttr(UCHAR driveNum, const UCHAR *path, UCHAR attr);
int FATGetFirstEntry(UCHAR driveNum, const UCHAR *path, UCHAR *name, FILE_INFO *finfo);
int FATGetNextEntry(UCHAR *name, FILE_INFO *finfo);
int FATMkdir(UCHAR driveNum, const UCHAR *path);
int FATRmdir(UCHAR driveNum, const UCHAR *path);
int FATGetFileInfo(UCHAR driveNum, const UCHAR *path, FILE_INFO *finfo);
int FATGetDriveInfo(UCHAR driveNum, DRIVE_INFO *drvInfo);
int FATChdir(UCHAR driveNum, const UCHAR *path);
int FATCwd(UCHAR driveNum, UCHAR **path);

#endif	/* _FAT_H */

⌨️ 快捷键说明

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