MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / FindDir

Method FindDir

Kernel/src/fs/filesystem.cpp:346–355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

344 }
345
346 FsNode* Root::FindDir(char* name){
347 if(strcmp(name, ".") == 0) return this;
348 if(strcmp(name, "..") == 0) return this;
349
350 for(unsigned i = 0; i < fs::volumes->get_length(); i++){
351 if(strcmp(fs::volumes->get_at(i)->mountPointDirent.name,name) == 0) return (fs::volumes->get_at(i)->mountPointDirent.node);
352 }
353
354 return NULL;
355 }
356
357 ssize_t Read(FsNode* node, size_t offset, size_t size, uint8_t *buffer){
358 assert(node);

Callers 1

FindDirFunction · 0.45

Calls 3

strcmpFunction · 0.85
get_atMethod · 0.80
get_lengthMethod · 0.45

Tested by

no test coverage detected