Skip to content

Expose mode from Luv.File.Stat.t as an integral or expose equality #134

@haesbaert

Description

@haesbaert

mode is a Mode.numeric

There is no good way to get the file type, normally you would AND with S_IFMT and test for equality with all the S_* types.
Testing the bits with Mode.test is not enough since the bits are shared between different file types.

Currently the only way I found to figure the filetype was doing:

    let mode = (Obj.magic lst.mode : int) in

And then doing all the mask and comparison myself, see ocaml-multicore/eio#339

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions