|
libxr
1.0
Want to be the best embedded framework
|
目录节点片段 / Directory-node fragment More...
#include <ramfs.hpp>
Public Member Functions | |
| void | Add (File &file) |
| 添加直属文件节点 / Add a direct child file node | |
| void | Add (Dir &dir) |
| 添加直属目录节点 / Add a direct child directory node | |
| void | Add (Custom &custom) |
| 添加直属自定义节点 / Add a direct child custom node | |
| FsNode * | FindNode (const char *name) |
| 查找直属子节点 / Find a direct child node | |
| File * | FindFile (const char *name) |
| 查找直属文件 / Find a direct child file | |
| File * | FindFileRev (const char *name) |
| 递归查找文件 / Find a file recursively | |
| Dir * | FindDir (const char *name) |
| 查找直属目录,支持 "." 和 ".." / Find a direct child directory, supporting "." and ".." | |
| Dir * | FindDirRev (const char *name) |
| 递归查找目录,支持 "." 和 ".." / Find a directory recursively, supporting "." and ".." | |
| Custom * | FindCustom (const char *name) |
| 查找直属自定义节点 / Find a direct child custom node | |
| Custom * | FindCustomRev (const char *name) |
| 递归查找自定义节点 / Find a custom node recursively | |
| template<typename Func > | |
| ErrorCode | Foreach (Func func) |
| 遍历直属子节点 / Iterate over direct child nodes | |
Public Member Functions inherited from LibXR::RamFS::FsNode | |
| FsNodeType | GetNodeType () const |
| 获取节点类型 / Get the node type | |
| const char * | GetName () const |
| 获取节点名称 / Get the node name | |
Private Member Functions | |
| Dir () | |
| 构造一个空目录壳 / Construct one empty directory shell | |
| Dir (const char *name) | |
| 构造一个具名目录壳 / Construct one named directory shell | |
| void | AddNode (FsNode &node) |
| 把一个节点挂到当前目录下 / Attach one node under the current directory | |
| FsNode * | FindNodeByType (const char *name, FsNodeType type) |
| 在当前目录按类型查找直属节点 / Find one direct child node of a given type | |
| FsNode * | FindNodeRevByType (const char *name, FsNodeType type) |
| 递归查找指定类型节点 / Find one node of a given type recursively | |
Private Attributes | |
| Tree | rbt_ |
| 当前目录直属子节点的名称索引树 / Name index tree of direct child nodes. | |
Friends | |
| class | RamFS |
Additional Inherited Members | |
Protected Member Functions inherited from LibXR::RamFS::FsNode | |
| FsNode (FsNodeType node_type) | |
| 用指定节点类型构造基类部分 / Construct the base node with a given node type | |
| FsNode (const FsNode &other) | |
| 拷贝构造节点基类部分 / Copy-construct the base-node portion | |
| FsNode & | operator= (const FsNode &)=delete |
Protected Attributes inherited from LibXR::RamFS::FsNode | |
| const char * | name_ = nullptr |
| 节点名称缓冲区 / Retained node-name buffer. | |
| FsNodeType | type_ |
| 节点运行时类型 / Runtime node type. | |
| Dir * | parent_ = nullptr |
| 父目录;根目录保持为空 / Parent directory; stays null for the root. | |
| Tree::Node< FsNode * > | tree_node_ |
| 当前节点挂进目录树时使用的树节点包装 / Tree node wrapper used when inserted into a directory tree. | |
目录节点片段 / Directory-node fragment
RamFS 的目录节点片段 / Directory-node fragment of RamFS
目录节点,管理直属子节点 / Directory node that owns a child namespace
|
private |
构造一个空目录壳 / Construct one empty directory shell
构造一个空目录壳 Construct one empty directory shell
Definition at line 110 of file ramfs.cpp.
|
explicitprivate |
构造一个具名目录壳 / Construct one named directory shell
构造一个具名目录壳 Construct one named directory shell
| name | 目录名称 / Directory name |
Definition at line 117 of file ramfs.cpp.
|
inline |
|
inline |
|
inline |
|
private |
把一个节点挂到当前目录下 / Attach one node under the current directory
把一个节点挂到当前目录下 Attach one node under the current directory
| node | 待挂接节点 / Node to attach |
Definition at line 124 of file ramfs.cpp.
| RamFS::Custom * RamFS::Dir::FindCustom | ( | const char * | name | ) |
查找直属自定义节点 / Find a direct child custom node
查找直属自定义节点 Find one direct child custom node
| name | 节点名称 / Node name |
| name | 节点名称 / Node name |
Definition at line 298 of file ramfs.cpp.
| RamFS::Custom * RamFS::Dir::FindCustomRev | ( | const char * | name | ) |
递归查找自定义节点 / Find a custom node recursively
递归查找自定义节点 Find one custom node recursively
| name | 节点名称 / Node name |
| name | 节点名称 / Node name |
Definition at line 310 of file ramfs.cpp.
| RamFS::Dir * RamFS::Dir::FindDir | ( | const char * | name | ) |
查找直属目录,支持 "." 和 ".." / Find a direct child directory, supporting "." and ".."
查找直属目录节点,支持 "." 和 ".." Find one direct child directory node, supporting "." and ".."
| name | 目录名 / Directory name |
| name | 目录名称 / Directory name |
Definition at line 244 of file ramfs.cpp.
| RamFS::Dir * RamFS::Dir::FindDirRev | ( | const char * | name | ) |
递归查找目录,支持 "." 和 ".." / Find a directory recursively, supporting "." and ".."
递归查找目录节点,支持 "." 和 ".." Find one directory node recursively, supporting "." and ".."
| name | 目录名 / Directory name |
| name | 目录名称 / Directory name |
Definition at line 271 of file ramfs.cpp.
| RamFS::File * RamFS::Dir::FindFile | ( | const char * | name | ) |
查找直属文件 / Find a direct child file
查找直属文件节点 Find one direct child file node
| name | 文件名 / File name |
| name | 文件名 / File name |
Definition at line 220 of file ramfs.cpp.
| RamFS::File * RamFS::Dir::FindFileRev | ( | const char * | name | ) |
| RamFS::FsNode * RamFS::Dir::FindNode | ( | const char * | name | ) |
查找直属子节点 / Find a direct child node
在当前目录查找直属子节点 Find one direct child node in the current directory
| name | 节点名称 / Node name |
| name | 节点名称 / Node name |
Definition at line 139 of file ramfs.cpp.
|
private |
在当前目录按类型查找直属节点 / Find one direct child node of a given type
在当前目录按类型查找直属节点 Find one direct child node of a given type
| name | 节点名称 / Node name |
| type | 目标节点类型 / Desired node type |
| name | 节点名称 / Node name |
| type | 目标节点类型 / Desired node type |
Definition at line 158 of file ramfs.cpp.
|
private |
递归查找指定类型节点 / Find one node of a given type recursively
递归查找指定类型节点 Find one node of a given type recursively
| name | 节点名称 / Node name |
| type | 目标节点类型 / Desired node type |
| name | 节点名称 / Node name |
| type | 目标节点类型 / Desired node type |
Definition at line 181 of file ramfs.cpp.
|
inline |
|
private |