BackupCursorIo.close.resource: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/transfer/BackupCursorIo.bend as BackupCursorIo Lines 79-95 of mylsm-lsm-store@0.6.0.1/src/transfer/BackupCursorIo.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/transfer/BackupCursorIo.bend&start_line=79&end_line=95 import Base import mylsm-lsm-store@0.6.0.1/src/scan/VisibleCursor.bend as VisibleCursor import mylsm-lsm-store@0.6.0.1/src/transfer/BackupIo.bend as BackupIo def close.resource( file: File, +directory: String, cursor: Maybe<&1, VisibleCursor.Cursor> ) -> IO(Result<&1, &1, BackupIo.Error, Unit>): match cursor: case Some{reader}: do IO>: _closed_cursor : Result<&1, &1, U32 & String, Unit> <- VisibleCursor.close(reader) _closed_file : Unit <- File.close(file) cleanup(directory) return Fail{BackupIo.ResourceLimit{}} case None{}: do IO>: _closed_file : Unit <- File.close(file) cleanup(directory) return Fail{BackupIo.ResourceLimit{}} Uses (15): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=File https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=File.close 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=Maybe 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=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/scan/VisibleCursor.bend&name=Cursor https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/VisibleCursor.bend&name=close https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/transfer/BackupCursorIo.bend&name=cleanup https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/transfer/BackupIo.bend&name=Error