MigrateIo.locked: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/transfer/MigrateIo.bend as MigrateIo Lines 639-650 of mylsm-lsm-store@0.6.0.1/src/transfer/MigrateIo.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/transfer/MigrateIo.bend&start_line=639&end_line=650 import Base import mylsm-lsm-store@0.6.0.1/src/DbLock.bend as DbLock import mylsm-lsm-store@0.6.0.1/src/DurableError.bend as DurableError import mylsm-lsm-store@0.6.0.1/src/Fs.bend as Fs # Continues source verification after exclusive lock acquisition. def locked( +path: String, result: Result<&1, &1, DurableError.Error, DbLock.Lock> ) -> IO(Result<&1, &1, Error, Nat>): match result: case Fail{error}: IO.pure(Result<&1, &1, Error, Nat>, Fail{LockError{error}}) case Done{lock}: do IO>: present : Result<&1, &1, U32 & String, Bool> <- Fs.exists(path ++ "/WAL") wal.exists(lock, present, path) Uses (15): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.pure https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/DbLock.bend&name=Lock https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/DurableError.bend&name=Error https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/Fs.bend&name=exists https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/transfer/MigrateIo.bend&name=Error https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/transfer/MigrateIo.bend&name=wal.exists