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

Function _wasmfs_write

system/lib/wasmfs/js_api.cpp:154–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152}
153
154int _wasmfs_write(int fd, void* buf, size_t count) {
155 __wasi_ciovec_t iovs[1];
156 iovs[0].buf = (uint8_t*)buf;
157 iovs[0].buf_len = count;
158
159 __wasi_size_t numBytes;
160 __wasi_errno_t err = __wasi_fd_write(fd, iovs, 1, &numBytes);
161 if (err) {
162 return -err;
163 }
164 return numBytes;
165}
166
167int _wasmfs_pwrite(int fd, void* buf, size_t count, off_t offset) {
168 __wasi_ciovec_t iovs[1];

Callers

nothing calls this directly

Calls 1

__wasi_fd_writeFunction · 0.70

Tested by

no test coverage detected