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

Method #checkWritable

lib/internal/vfs/file_handle.js:405–409  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

403 * Throws EBADF if the handle was not opened for writing.
404 */
405 #checkWritable() {
406 if (this.flags === 'r') {
407 throw createEBADF('write');
408 }
409 }
410
411 /**
412 * Throws EBADF if the handle was not opened for reading.

Callers 3

writeSyncMethod · 0.95
writeFileSyncMethod · 0.95
truncateSyncMethod · 0.95

Calls 1

createEBADFFunction · 0.85

Tested by

no test coverage detected