MCPcopy Create free account
hub / github.com/Effect-TS/effect / seek

Method seek

packages/platform/node-shared/src/NodeFileSystem.ts:277–288  ·  view source on GitHub ↗
(offset: FileSystem.SizeInput, from: FileSystem.SeekMode)

Source from the content-addressed store, hash-verified

275 }
276
277 seek(offset: FileSystem.SizeInput, from: FileSystem.SeekMode) {
278 const offsetSize = FileSystem.Size(offset)
279 return Effect.sync(() => {
280 if (from === "start") {
281 this.position = offsetSize
282 } else if (from === "current") {
283 this.position = this.position + offsetSize
284 }
285
286 return FileSystem.Size(this.position)
287 })
288 }
289
290 read(buffer: Uint8Array) {
291 return Effect.suspend(() => {

Callers

nothing calls this directly

Calls 1

syncMethod · 0.45

Tested by

no test coverage detected