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

📄 namenode.h

📁 老外写的一个文件系统
💻 H
字号:
#ifndef NAMENODE_H
#define NAMENODE_H

//	A NameNode is everything you need to know about a file
//	- NameNodeHandle of the parent folder to this name.
//	- null-terminated string, which is the name itself (variable length).

// this handle is made up of a DramPageIndex, and an *offset in bytes* in that page.
typedef unsigned long NameNodeHandle;

// if you want to refer to the fact that "no name" is present.
#define NO_NAME_NODE	0

void NAMENODE_Initialize(void);

// create a new FileNode to represent a file, and return its' handle.
NameNodeHandle NAMENODE_AddName(
	NameNodeHandle nameOfParentFolder,
	XDATA char *stringName
);

// this routine will build a filename string for the name which is requested.
// NOTE: It will build the name at whatever address is provided.  It is expected
// that the caller has allocated sufficient space for the string already.
// This routine does *not* build a full path name, just the filename.
void NAMENODE_GetNameString(
	NameNodeHandle, 
	XDATA char *strToBuildInto);	// IN, OUT

// the reason I provide this function against a NAMENODE, is because otherwise
// the entire name-string would have to be copied within memory, and that can take a while.
// It's much faster to just have this object check for us.
char NAMENODE_IsExtentionMP3(NameNodeHandle);

#endif

⌨️ 快捷键说明

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