Journal.open: def of bend-kit-journal@0.3.1.0 Import: import bend-kit-journal@0.3.1.0/journal.bend as Journal Lines 348-354 of bend-kit-journal@0.3.1.0/journal.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-journal@0.3.1.0/journal.bend&start_line=348&end_line=354 import Base import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes # Opens the journal at path and folds step over its committed records, from acc. # A torn tail is cut off and fsynced before open answers. A corrupt frame fails with EINVAL and # its offset; the file is left as it is. max caps a record's length; limit caps the file's size. def open(~A: Type, ~step: A -> Bytes.Bytes -> A, path: String, +max: U32, limit: U32, acc: A) -> IO(Result<&1, &1, U32 & String, Journal & A>): do IO>: r : Result<&1, &1, U32 & String, File & U32 & Array> <- open.words(path, limit) open.read(~A, ~step, r, max, acc) Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array 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=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=U32 https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=Bytes https://jend.leeeet.dev/definition.txt?path=bend-kit-journal@0.3.1.0/journal.bend&name=Journal https://jend.leeeet.dev/definition.txt?path=bend-kit-journal@0.3.1.0/journal.bend&name=open.read https://jend.leeeet.dev/definition.txt?path=bend-kit-journal@0.3.1.0/journal.bend&name=open.words