dotnet-api-docs
dotnet-api-docs copied to clipboard
.NET FileSecurity documentation error
The .NET 8 FileSecurity documentation has incorrect examples
This document recommends the use of SetAccessControl and GetAccessControl through the File class, which does not work in .NET 8
The example should be modified to use new FileInfo(fileName).SetAccessControl(fSecurity)
The reference links in the .NET 8 documentation also redirect to .NET Framework documentation, which is confusing for users.
The example should be modified to use
new FileInfo(fileName).SetAccessControl(fSecurity)
I agree. Would you like to send a PR with a fix?
The reference links in the .NET 8 documentation also redirect to .NET Framework documentation, which is confusing for users.
My guess it's because File.SetAccessControl and FileInfo.SetAccessControl don't exist in .NET (Core), but we provide extension methods for FileInfo:
@gewarren is it possible to customize the redirection for this API?
@adamsitnik I can fix this - thanks.