MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / getDirectoryEntry

Method getDirectoryEntry

source/io/fsopennode.cpp:88–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88std::shared_ptr<FsNode> FsOpenNode::getDirectoryEntry(U32 index, BString& name) {
89 if (!this->node) {
90 return nullptr;
91 }
92 this->loadDirEntries();
93 if (index==0)
94 name = B(".");
95 else if (index==1 && this->node->getParent().lock())
96 name = B("..");
97 else
98 name = this->dirEntries[index]->name;
99 return this->dirEntries[index];
100}

Callers 1

getdentsMethod · 0.80

Calls 4

loadDirEntriesMethod · 0.95
BFunction · 0.85
lockMethod · 0.45
getParentMethod · 0.45

Tested by

no test coverage detected