MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / getEntries

Method getEntries

system/lib/wasmfs/file.cpp:237–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

235}
236
237Directory::MaybeEntries Directory::Handle::getEntries() {
238 auto entries = getDir()->getEntries();
239 if (entries.getError()) {
240 return entries;
241 }
242 auto& dcache = getDir()->dcache;
243 for (auto it = dcache.begin(); it != dcache.end(); ++it) {
244 auto& [name, entry] = *it;
245 if (entry.kind == DCacheKind::Mount) {
246 entries->push_back({name, entry.file->kind, entry.file->getIno()});
247 }
248 }
249 return entries;
250}
251
252} // namespace wasmfs

Callers 1

createMethod · 0.45

Calls 5

getInoMethod · 0.80
push_backMethod · 0.65
getErrorMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected