(path, options)
| 1587 | } |
| 1588 | |
| 1589 | async function mkdir(path, options) { |
| 1590 | const h = vfsState.handlers; |
| 1591 | if (h !== null) { |
| 1592 | const promise = h.mkdir(path, options); |
| 1593 | if (promise !== undefined) return (await promise).result; |
| 1594 | } |
| 1595 | if (typeof options === 'number' || typeof options === 'string') { |
| 1596 | options = { mode: options }; |
| 1597 | } |
| 1598 | const { |
| 1599 | recursive = false, |
| 1600 | mode = 0o777, |
| 1601 | } = options || kEmptyObject; |
| 1602 | path = getValidatedPath(path); |
| 1603 | validateBoolean(recursive, 'options.recursive'); |
| 1604 | |
| 1605 | return await PromisePrototypeThen( |
| 1606 | binding.mkdir( |
| 1607 | path, |
| 1608 | parseFileMode(mode, 'mode', 0o777), |
| 1609 | recursive, |
| 1610 | kUsePromises, |
| 1611 | ), |
| 1612 | undefined, |
| 1613 | handleErrorFromBinding, |
| 1614 | ); |
| 1615 | } |
| 1616 | |
| 1617 | async function readdirRecursive(originalPath, options) { |
| 1618 | const result = []; |
no test coverage detected
searching dependent graphs…