rust-lang / rust-lang/rust

Tracking Issue for extending `std::fs::Permissions` on Windows

Open
#152,956 3 comments 0 reactions 1 assignee View on GitHub

@asder8215 is already working on this.

Since Feb 22, 2026.

A-filesystem A-permissions C-tracking-issue O-windows T-libs
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

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.)

  • ACP: rust-lang/libs-team#388
  • Implementation: #152995
  • Final comment period (FCP)^1
  • Stabilization PR
Unresolved Questions
  • From the ACP discussion, what specific file attribute should have a method?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.