BackupIo.start: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/transfer/BackupIo.bend as BackupIo Lines 252-260 of mylsm-lsm-store@0.6.0.1/src/transfer/BackupIo.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/transfer/BackupIo.bend&start_line=252&end_line=260 import Base import mylsm-lsm-store@0.6.0.1/src/transfer/Backup.bend as Backup import mylsm-lsm-store@0.6.0.1/src/Fs.bend as Fs # Stages a backup bundle and publishes it without replacing an existing path. def start(+destination: String, stream: Backup.Stream) -> IO(Result<&1, &1, Error, Unit>): match stream: case Backup.Stream{_, _, _, +block_count, _}: +temporary = destination ++ ".backup-060.tmp" do IO>: exists : Result<&1, &1, U32 & String, Bool> <- Fs.exists(path.clone(destination)) destination.checked(destination, temporary, exists, stream, Backup.write_fuel(U32.to_nat(block_count))) Uses (16): 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=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=Base/base.bend&name=U32.to_nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit 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/Backup.bend&name=Stream https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/transfer/Backup.bend&name=write_fuel https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/transfer/BackupIo.bend&name=Error https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/transfer/BackupIo.bend&name=destination.checked https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/transfer/BackupIo.bend&name=path.clone