(offset: FileSystem.SizeInput, from: FileSystem.SeekMode)
| 247 | } |
| 248 | |
| 249 | seek(offset: FileSystem.SizeInput, from: FileSystem.SeekMode) { |
| 250 | const offsetSize = FileSystem.Size(offset) |
| 251 | return this.semaphore.withPermits(1)( |
| 252 | Effect.sync(() => { |
| 253 | if (from === "start") { |
| 254 | this.position = offsetSize |
| 255 | } else if (from === "current") { |
| 256 | this.position = this.position + offsetSize |
| 257 | } |
| 258 | |
| 259 | return this.position |
| 260 | }) |
| 261 | ) |
| 262 | } |
| 263 | |
| 264 | read(buffer: Uint8Array) { |
| 265 | return this.semaphore.withPermits(1)( |
no test coverage detected