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

Function doChdir

system/lib/wasmfs/syscalls.cpp:722–729  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

720}
721
722static int doChdir(std::shared_ptr<File>& file) {
723 auto dir = file->dynCast<Directory>();
724 if (!dir) {
725 return -ENOTDIR;
726 }
727 wasmFS.setCWD(dir);
728 return 0;
729}
730
731int __syscall_chdir(const char* path) {
732 auto parsed = path::parseFile(path);

Callers 2

__syscall_chdirFunction · 0.85
__syscall_fchdirFunction · 0.85

Calls 1

setCWDMethod · 0.80

Tested by

no test coverage detected