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

Function touch

test/other/test_readdir_r_silly.cpp:67–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67void touch(const char* path) {
68 int fd = open(path, O_CREAT | O_TRUNC, 0644);
69 assert(fd != -1);
70 assert(close(fd) != -1);
71}
72
73int main() {
74 assert(mkdir("dir", 0755) == 0);

Callers 1

mainFunction · 0.70

Calls 3

openFunction · 0.50
assertFunction · 0.50
closeFunction · 0.50

Tested by

no test coverage detected