(length?: FileSystem.SizeInput)
| 261 | } |
| 262 | |
| 263 | truncate(length?: FileSystem.SizeInput) { |
| 264 | const size = FileSystem.Size(length ?? 0) |
| 265 | return Effect.map( |
| 266 | tryPromise("truncate", undefined, () => this.file.truncate(Number(size))), |
| 267 | () => { |
| 268 | if (!this.append && this.position > size) { |
| 269 | this.position = size |
| 270 | } |
| 271 | } |
| 272 | ) |
| 273 | } |
| 274 | |
| 275 | private writeChunk(method: string, buffer: Uint8Array) { |
| 276 | return Effect.suspend(() => { |
no test coverage detected