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

Method insertDataFile

system/lib/wasmfs/file.cpp:91–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91std::shared_ptr<DataFile>
92Directory::Handle::insertDataFile(const std::string& name, mode_t mode) {
93 // Cannot insert into an unlinked directory.
94 if (!getParent()) {
95 return nullptr;
96 }
97 auto child = getDir()->insertDataFile(name, mode);
98 if (!child) {
99 return nullptr;
100 }
101 cacheChild(name, child, DCacheKind::Normal);
102 updateMTime();
103 return child;
104}
105
106std::shared_ptr<Directory>
107Directory::Handle::insertDirectory(const std::string& name, mode_t mode) {

Callers 3

_wasmfs_write_fileFunction · 0.45
doOpenFunction · 0.45
preloadFilesMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected