def is_dir
import bolt@1.27.0.0/src/walk/disk.bend as Diskimport Base
66# whether a path is a directory: it opens, and reading it fails as a
67# directory's read does. Base's File has no stat, and a directory opens for
68# reading on both lanes.
69def is_dir(path: String) -> IO(Bool): # noqa: L001 disk effect
70 do IO<Bool>:
71 r : Result<&1, &1, U32 & String, File> <- File.open(path, "r")
72 is_dir.opened(r)