Sys.sys.read.sized: def of ezsys@0.1.0.0 Import: import ezsys@0.1.0.0/src/sys.bend as Sys Lines 81-90 of ezsys@0.1.0.0/src/sys.bend: https://jend.leeeet.dev/read.txt?path=ezsys@0.1.0.0/src/sys.bend&start_line=81&end_line=90 import Base import ezsys@0.1.0.0/src/step.bend as Step # the file's size decides the chunk; a failed size is the answer def sys.read.sized( pair: File & Result<&1, &1, U32 & String, U32> ) -> IO(Result<&1, &1, U32 & String, String>): (file, res) = pair match res: case Fail{error}: sys.read.end(file, Fail{error}) case Done{size}: sys.read.go(sys.read.fuel(), file, "", Step.read.chunk(size)) Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=File https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO 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=Sigma 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=ezsys@0.1.0.0/src/step.bend&name=read.chunk https://jend.leeeet.dev/definition.txt?path=ezsys@0.1.0.0/src/sys.bend&name=sys.read.end https://jend.leeeet.dev/definition.txt?path=ezsys@0.1.0.0/src/sys.bend&name=sys.read.fuel https://jend.leeeet.dev/definition.txt?path=ezsys@0.1.0.0/src/sys.bend&name=sys.read.go