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

Method getName

system/lib/wasmfs/file.cpp:209–220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207}
208
209std::string Directory::Handle::getName(std::shared_ptr<File> file) {
210 if (getDir()->maintainsFileIdentity()) {
211 return getDir()->getName(file);
212 }
213 auto& dcache = getDir()->dcache;
214 for (auto it = dcache.begin(); it != dcache.end(); ++it) {
215 if (it->second.file == file) {
216 return it->first;
217 }
218 }
219 return "";
220}
221
222ssize_t Directory::Handle::getNumEntries() {
223 size_t mounts = 0;

Callers 2

__syscall_getcwdFunction · 0.45
getPathFunction · 0.45

Calls 3

maintainsFileIdentityMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected