(existingPath, newPath)
| 616 | truncate: (path, len) => |
| 617 | vfsOp(path, (vfs, n) => vfs.promises.truncate(n, len).then(() => true)), |
| 618 | link(existingPath, newPath) { |
| 619 | return vfsOp(existingPath, (vfs, n) => { |
| 620 | checkSameVFS(n, toPathStr(newPath), 'link', vfs); |
| 621 | return vfs.promises.link(n, resolve(toPathStr(newPath))).then(() => true); |
| 622 | }); |
| 623 | }, |
| 624 | mkdtemp(prefix, options) { |
| 625 | const promise = vfsOp(prefix, (vfs, n) => vfs.promises.mkdtemp(n)); |
| 626 | if (promise !== undefined && options?.encoding === 'buffer') { |