Last active
June 8, 2020 22:55
-
-
Save droyo/be3fd25ac552c33cc1463ee132001367 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let decode = Angstrom.( | |
advance 2 >>= fun () -> (* skip length prefix *) | |
LE.any_uint16 >>= fun s_type -> | |
LE.any_int32 >>= fun s_dev -> | |
Qid.decode >>= fun s_qid -> | |
LE.any_int32 >>= fun s_mode -> | |
LE.any_int32 >>= fun s_atime -> | |
LE.any_int32 >>= fun s_mtime -> | |
LE.any_int64 >>= fun s_length -> | |
decode_string >>= fun s_name -> | |
decode_string >>= fun s_uid -> | |
decode_string >>= fun s_gid -> | |
decode_string >>= fun s_muid -> | |
return { s_type; s_dev; s_qid; s_mode; s_atime | |
; s_mtime; s_length; s_name; s_uid; s_gid; s_muid }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment