def file_size

gralha-byte-words@0.1.0.0 · words.bend:210

import gralha-byte-words@0.1.0.0/words.bend as Words
import Base

210# a member's byte count, read off its open handle
211def file_size(+path: String) -> IO(U32):
212  do IO<U32>:
213    opened : Result<&1, &1, U32 & String, File> <- File.open(path, "r")
214    file : File <- open_got(path, opened)
215    r : File & Result<&1, &1, U32 & String, U32> <- File.size(file)
216    size_close(path, r)

Uses (11)

Used by (0)

No other definition uses this definition.