Skip to content

Tracking issue for OpenOptionsExt on Windows #27720

Closed

Description

@alexcrichton

This is a tracking issue for the unstable open_options_ext feature in the standard library. Currently Unix has a stable extension trait for setting the mode of a file but Windows has not stabilized any of its functionality. The current set of methods on the Windows extension trait just provide the ability to override any of the arguments to CreateFile.

The open questions here are:

  • Is the naming right?
  • Are the types right? (e.g. should they be updated to use std::os::windows::raw?)
  • Do more options want to be specified?
  • Does Unix want any more methods on OpenOptionsExt?

APIs:

  • OpenOptionsExt::access_mode
  • OpenOptionsExt::share_mode
  • OpenOptionsExt::attributes
  • OpenOptionsExt::security_qos_flags

Activity

  1. added
    T-libs-api
    B-unstable
    on Aug 12, 2015
  2. retep998 commented on Aug 13, 2015

    @retep998
    Contributor

    For CreateFile2 (which Rust would have to use if we wanted to support non-desktop apps since CreateFile is desktop only) it takes flags and attributes as two separate parameters, so it may be a good idea to separate those and then when we invoke CreateFile just combine them back together.

  3. retep998 commented on Aug 13, 2015

    @retep998
    Contributor

    u32 is very much the right type to use, although whether it should be behind some sort of alias is an entirely different debate and would be a backwards compatible change to make so it isn't an issue regardless.

    There are more options that we will want to eventually support.

  4. alexcrichton commented on Aug 13, 2015

    @alexcrichton
    MemberAuthor

    Interesting! Perhaps we should call CreateFile2 unless it's not available? (e.g. Windows 7 and below).

    Also yeah u32 is fine, I figure we may want to take a DWORD alias though (although also perhaps not)

  5. kamalmarhubi commented on Jan 7, 2016

    @kamalmarhubi
    Contributor

    Does Unix want any more methods on OpenOptionsExt?

    I'd like it if Unix exposed the flags parameter to open.

  6. kamalmarhubi commented on Jan 7, 2016

    @kamalmarhubi
    Contributor

    Additionally, it would be nice to have a way to toggle particular flags as opposed to just overriding all of them.

  7. added a commit that references this issue on Jan 20, 2016
  8. alexcrichton commented on Apr 29, 2016

    @alexcrichton
    MemberAuthor

    🔔 This issue is now entering its cycle-long final comment period for stabilization 🔔

    The libs team would like to perform one final pass to ensure that all of these arguments have very clearly documented interactions with the underlying arguments and other builder options, but otherwise these seem good for stabilizing!

  9. added
    final-comment-period
    and removed on Apr 29, 2016
  10. 7 remaining items

  11. added a commit that references this issue on May 24, 2016
    cae91d7
  12. added a commit that references this issue on May 26, 2016
    a2141e2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    B-unstableT-libs-apifinal-comment-period

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions