Disk.is_dir.opened: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/walk/disk.bend as Disk Lines 56-64 of bolt@1.27.0.0/src/walk/disk.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/walk/disk.bend&start_line=56&end_line=64 import Base # a path that opened: read one byte and see; one that did not is no directory def is_dir.opened(rr: Result<&1, &1, U32 & String, File>) -> IO(Bool): match rr: case Fail{_e}: IO.pure(Bool, False{}) case Done{file}: do IO: got : File & Result<&1, &1, U32 & String, List<&2, U32>> <- File.read_bytes(file, 1) is_dir.got(got) Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=File https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=File.read_bytes 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=List 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=bolt@1.27.0.0/src/walk/disk.bend&name=is_dir.got