Describes a node, which is a named entry within the filesystem, and is either a file or a directory. More...
#include "memfs.h"
Data Fields | |
uint32 | type |
Indicates whether this node is a file or a directory. | |
HqBool | fReadOnly |
Indicates whether this node (regardless of its type) should be locked against changes. | |
HqBool | fDynamic |
Determines whether this structure (and its pointer fields) refer to runtime-allocated memory, and thus whether they should be freed when this node is destroyed. | |
char * | pszName |
The leaf name of this entry within the filesystem. | |
MFSFILE * | pFile |
Pointer to the file, if this node is a file. More... | |
MFSDIR * | pDir |
Pointer to the directory, if this node is a directory. More... | |
Describes a node, which is a named entry within the filesystem, and is either a file or a directory.
If this node is a file, then it is a leaf node. If it is a directory, then it contains an array of pointers to the child MFSNODE structures.
Nodes do not contain parent pointers.
MFSDIR* _MFSNODE::pDir |
Pointer to the directory, if this node is a directory.
Only one of the pFile or pDir slots is used in any one node. Conceptually, these two fields are a union. We do not use a union, however, because unions are hard to initialize statically. (The C standard dictates that only the first field of a union may be statically initialized).
MFSFILE* _MFSNODE::pFile |
Pointer to the file, if this node is a file.
Only one of the pFile or pDir slots is used in any one node. Conceptually, these two fields are a union. We do not use a union, however, because unions are hard to initialize statically. (The C standard dictates that only the first field of a union may be statically initialized).