-
Notifications
You must be signed in to change notification settings - Fork 1.6k
add missing examples for the EnumerateFiles method #11781
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
add missing examples for the EnumerateFiles method #11781
Conversation
I'm going to change the type names so it compiles. |
securityRules.AddAccessRule(new FileSystemAccessRule(@"Domain\account1", FileSystemRights.Read, AccessControlType.Allow)); | ||
securityRules.AddAccessRule(new FileSystemAccessRule(@"Domain\account2", FileSystemRights.FullControl, AccessControlType.Allow)); | ||
|
||
DirectoryInfo di = Directory.CreateDirectory(@"C:\destination\NewDirectory", securityRules); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @gewarren, this code is legacy, right? The second parameter of the CreateDirectory
method is only for Unix-like systems, or am I wrong?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, looks like the 2-parameter overload takes a DirectorySecurity in .NET Framework and a UnixFileMode in .NET. So this project will need to target .NET Framework instead of .NET 9 since this example is used in the .NET Framework overload docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, Thanks!
Summary
EnumerateFiles
method using theEnumerationOptions
parameter for C#, F#, and VB.NET.Fixes #10817