MCPcopy Index your code
hub / github.com/python/cpython / read

Method read

Platforms/emscripten/streams.mjs:174–186  ·  view source on GitHub ↗
(buffer)

Source from the content-addressed store, hash-verified

172 }
173
174 read(buffer) {
175 try {
176 return fs.readSync(this.nodeStream.fd, buffer);
177 } catch (e) {
178 // Platform differences: on Windows, reading EOF throws an exception,
179 // but on other OSes, reading EOF returns 0. Uniformize behavior by
180 // catching the EOF exception and returning 0.
181 if (e.toString().includes("EOF")) {
182 return 0;
183 }
184 throw e;
185 }
186 }
187
188 fsync() {
189 nodeFsync(this.nodeStream.fd);

Callers 11

read_textFunction · 0.45
dumpFunction · 0.45
fixFunction · 0.45
clean_contentsFunction · 0.45
get_builddirFunction · 0.45
detect_extension_modulesFunction · 0.45
streams.mjsFile · 0.45
readAsyncFunction · 0.45
parseFunction · 0.45
get_tcltk_libFunction · 0.45
calculate_from_build_dirFunction · 0.45

Calls 1

toStringMethod · 0.80

Tested by 1

dumpFunction · 0.36