Skip to content

OpenOptionsExt: add flags method #1273

Closed
@pfpacket

Description

@pfpacket

I recently encountered the case that needs to open a file with the given raw c_int flags, which is the second argument of open(2).

I think it's better to be able to create a OpenOptions with the given flags in the cases dealing with FFI or network protocols and so on.

Here is my experimental try.
branch: https://github.com/pfpacket/rust/tree/openoptext-flag

Edit:
Now I think from_flag method is unnecessary, so I removed it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions