(info: FileSystem.File.Info)
| 80 | }>()("effect/http/Etag/Generator") {} |
| 81 | |
| 82 | const fromFileInfo = (info: FileSystem.File.Info) => { |
| 83 | const mtime = Option.match(info.mtime, { |
| 84 | onNone: () => "0", |
| 85 | onSome: (mtime) => mtime.getTime().toString(16) |
| 86 | }) |
| 87 | return `${info.size.toString(16)}-${mtime}` |
| 88 | } |
| 89 | |
| 90 | const fromFileWeb = (file: Body.HttpBody.FileLike) => { |
| 91 | return `${file.size.toString(16)}-${file.lastModified.toString(16)}` |