( src: string | URL, dest: string | URL, options: InternalCopyOptions, )
| 98 | |
| 99 | /* copy file to dest */ |
| 100 | async function copyFile( |
| 101 | src: string | URL, |
| 102 | dest: string | URL, |
| 103 | options: InternalCopyOptions, |
| 104 | ) { |
| 105 | await ensureValidCopy(src, dest, options); |
| 106 | await Deno.copyFile(src, dest); |
| 107 | if (options.preserveTimestamps) { |
| 108 | const statInfo = await Deno.stat(src); |
| 109 | assertIsDate(statInfo.atime, "statInfo.atime"); |
| 110 | assertIsDate(statInfo.mtime, "statInfo.mtime"); |
| 111 | await Deno.utime(dest, statInfo.atime, statInfo.mtime); |
| 112 | } |
| 113 | } |
| 114 | /* copy file to dest synchronously */ |
| 115 | function copyFileSync( |
| 116 | src: string | URL, |
no test coverage detected