Block device abstraction for OCaml 5 with Eio direct-style I/O and Bytesrw integration
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ocaml-block: collapse block.mli read example after dune fmt

Pure formatting: dune fmt fits the Ok branch on one line.

+1 -2
+1 -2
lib/block.mli
··· 25 25 let info = Block.info blk in 26 26 Printf.printf "Sectors: %Ld, Size: %d\n" info.sectors info.sector_size; 27 27 match Block.read blk 0L with 28 - | Ok data -> 29 - Printf.printf "first sector: %d bytes\n" (String.length data) 28 + | Ok data -> Printf.printf "first sector: %d bytes\n" (String.length data) 30 29 | Error _ -> Printf.eprintf "read failed\n" 31 30 ]} 32 31