Skip to content

[API Proposal]: Add FileAttributes.None #83125

Description

@meziantou

Background and motivation

Similar to #79868, but for System.IO.FileAttributes.

One use-case for the 0 value is when enumerating files. 0 allows to not exclude files from enumeration based on their attributes.

new System.IO.EnumerationOptions()
{
AttributesToSkip = 0,
}

API Proposal

namespaceSystem.IO;[System.Flags]publicenumFileAttributes{None=0,// Existing values:// ReadOnly// Hidden// ...

API Usage

Directory.EnumerateFiles("folder","*",newSystem.IO.EnumerationOptions(){AttributesToSkip=FileAttributes.None,});

Could also be used in

Alternative Designs

No response

Risks

No response

Metadata

Metadata

Assignees

Labels

api-approvedAPI was approved in API review, it can be implementedarea-System.IOgood first issueIssue should be easy to implement, good for first-time contributorshelp wanted[up-for-grabs] Good issue for external contributors

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions