Skip to content

Tracking Issue for extending std::fs::Permissions on Windows #152956

Open

Description

@asder8215

Feature gate: #![feature(windows_permissions_ext)]

This is a tracking issue for rust-lang/libs-team#388

It adds an extension trait PermissionsExt to Permissions struct for Windows to get and set file attributes.

Public API

// std::os::windows::fs::PermissionsExt;
pub trait PermissionsExt: Sealed {
    /// Returns the file attribute bits.
    fn file_attributes(&self) -> u32;

    /// Sets the file attribute bits.
    fn set_file_attributes(&mut self, mask: u32);

    /// Creates a new instance from the given file attribute bits.
    fn from_file_attributes(mask: u32) -> Self;
}

Steps / History

(Remember to update the S-tracking-* label when checking boxes.)

Unresolved Questions

  • From the ACP discussion, what specific file attribute should have a method?

Footnotes

  1. https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩

Activity

  1. added
    T-libs-api[DEPRECATED; DO NOT USE]
    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFC
    on Feb 22, 2026
  2. asder8215 commented on Feb 22, 2026

    @asder8215
    ContributorAuthor

    @rustbot claim

  3. added 3 commits that reference this issue on Apr 19, 2026
  4. added 3 commits that reference this issue on Apr 26, 2026
  5. added a commit that references this issue on Apr 27, 2026
  6. asder8215 commented on May 2, 2026

    @asder8215
    ContributorAuthor

    @rustbot label -S-tracking-unimplemented

  7. changed the title [-]Tracking Issue for extending std::fs::Permissions on Windows[/-] [+]Tracking Issue for extending `std::fs::Permissions` on Windows[/+] on Jun 19, 2026
  8. added
    T-libsRelevant to the library team, which will review and decide on the PR/issue.
    and removed
    T-libs-api[DEPRECATED; DO NOT USE]
    on Aug 12, 2026
  9. bardiharborow commented on Aug 24, 2026

    @bardiharborow
    Contributor

    @rustbot label +A-filesystem +A-permissions +O-windows

  10. added
    A-permissionsArea: filesystem perms and other kind of permissions
    O-windowsOperating system: Windows
    on Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-filesystemArea: `std::fs`A-permissionsArea: filesystem perms and other kind of permissionsC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCO-windowsOperating system: WindowsT-libsRelevant to the library team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions