MCPcopy Index your code
hub / github.com/nodejs/node / #checkReadable

Method #checkReadable

lib/internal/vfs/file_handle.js:414–419  ·  view source on GitHub ↗

* Throws EBADF if the handle was not opened for reading.

()

Source from the content-addressed store, hash-verified

412 * Throws EBADF if the handle was not opened for reading.
413 */
414 #checkReadable() {
415 const f = this.flags;
416 if (f === 'w' || f === 'a' || f === 'wx' || f === 'ax') {
417 throw createEBADF('read');
418 }
419 }
420
421 /**
422 * Returns true if this handle was opened in append mode.

Callers 3

readSyncMethod · 0.95
readFileSyncMethod · 0.95
readFileMethod · 0.95

Calls 1

createEBADFFunction · 0.85

Tested by

no test coverage detected