📄 scan.h
字号:
#ifndef _SCAN_H
#define _SCAN_H
#include "ramdisk.h"
struct scanDir
{
unsigned char pathName[MAX_PATH_LENGTH]; // the complete path name of the dir
struct diskBlock *startBlock; // the starting block (for ROOT dir)
struct directory *theEntry; // pointer to the directory entry of the dir (for sub-dir)
};
/*************************************************************
Fuction : RD_scanDisk
Scan the RAMDisk for errors
Input:
interactive - ECHO_ON: show progress during scanning
ECHO_OFF: show nothing during scanning
fix - 1: automatically fix error
0: report only, don't fix
Output:
0: no error is found
-1: system error (check RDerrno)
Otherwise:
bit 0: File/Dir error
bit 1: Disk space inconsistent
**************************************************************/
char RD_scanDisk(char interactive, char fix);
char RD_scanDisk_r(char interactive, char fix, long *totalUsedSize, long *totalFileSize, long *totalCompressSize);
/*************************************************************
Fuction : RD_checkFile
Check the integrity of a file entry
Input:
options - interactive? auto-fix?
pathname - the pathname of the file
entry - the directory structure of the target file
strTemp - a string buffer
Output:
totalFileSize - the total size of the files
totalCompressSize - the total compressed size of the files
Return value:
-1 : file has error
else : actual memory size taken by the file
**************************************************************/
long RD_checkFile(char options, unsigned char *pathname, struct directory *entry, long *totalFileSize, long *totalCompressSize, char *strTemp);
/*************************************************************
Fuction : RD_checkDir
Check the integrity of a dir
Input:
options - interactive? auto-fix?
target - the directory information of the directory being checked
strTemp - a string buffer
Output:
totalFileSize - the total size of the files
totalCompressSize - the total compressed size of the files
Return value:
-1: system error
else; the total RAMDisk memory size taken by the dir excluding its sub-dirs
**************************************************************/
long RD_checkDir(char options, struct scanDir *targetDir, long *totalFileSize, long *totalCompressSize, char *strTemp);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -