BackupIo.publish.rename: 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 101-114 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=101&end_line=114 import Base import mylsm-lsm-store@0.6.0.1/src/transfer/PublicationPolicy.bend as PublicationPolicy import mylsm-lsm-store@0.6.0.1/src/CrashPoint.bend as CrashPoint import mylsm-lsm-store@0.6.0.1/src/Fs.bend as Fs def publish.rename( +destination: String, +temporary: String, result: Result<&1, &1, U32 & String, Unit> ) -> IO(Result<&1, &1, Error, Unit>): match result: case Fail{error}: publish.rename.failed(temporary, PublicationPolicy.failure(PublicationPolicy.BeforeRename{}), error) case Done{Unit{}}: do IO>: _stopped : Result<&1, &1, U32 & String, Unit> <- CrashPoint.hit("backup.renamed") synced : Result<&1, &1, U32 & String, Unit> <- Fs.fsync(path.clone(destination ++ "/..")) publish.parent(temporary, synced) Uses (16): 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=Unit https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/CrashPoint.bend&name=hit https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/Fs.bend&name=fsync 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=path.clone https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/transfer/BackupIo.bend&name=publish.parent https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/transfer/BackupIo.bend&name=publish.rename.failed https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/transfer/PublicationPolicy.bend&name=Phase https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/transfer/PublicationPolicy.bend&name=failure