(path, options)
| 402 | // TODO(@jasnell): Now that the File class exists, we might consider having |
| 403 | // this return a `File` instead of a `Blob`. |
| 404 | function createBlobFromFilePath(path, options) { |
| 405 | const maybeBlob = _createBlobFromFilePath(path); |
| 406 | if (maybeBlob === undefined) { |
| 407 | return lazyDOMException('The blob could not be read', 'NotReadableError'); |
| 408 | } |
| 409 | const { 0: blob, 1: length } = maybeBlob; |
| 410 | const res = createBlob(blob, length, options?.type); |
| 411 | res[kNotCloneable] = true; |
| 412 | return res; |
| 413 | } |
| 414 | |
| 415 | function arrayBuffer(blob) { |
| 416 | const { promise, resolve, reject } = PromiseWithResolvers(); |
no test coverage detected
searching dependent graphs…