(path5, { mtimeMs, size }, filenameOrOptions, options = {})
| 14772 | isFile: () => isFile |
| 14773 | }); |
| 14774 | function createFileFromPath(path5, { mtimeMs, size }, filenameOrOptions, options = {}) { |
| 14775 | let filename; |
| 14776 | if (isPlainObject_default2(filenameOrOptions)) { |
| 14777 | [options, filename] = [filenameOrOptions, void 0]; |
| 14778 | } else { |
| 14779 | filename = filenameOrOptions; |
| 14780 | } |
| 14781 | const file = new FileFromPath({ path: path5, size, lastModified: mtimeMs }); |
| 14782 | if (!filename) { |
| 14783 | filename = file.name; |
| 14784 | } |
| 14785 | return new File3([file], filename, { |
| 14786 | ...options, |
| 14787 | lastModified: file.lastModified |
| 14788 | }); |
| 14789 | } |
| 14790 | function fileFromPathSync(path5, filenameOrOptions, options = {}) { |
| 14791 | const stats = (0, import_fs2.statSync)(path5); |
| 14792 | return createFileFromPath(path5, stats, filenameOrOptions, options); |
no outgoing calls
no test coverage detected