This repository was archived by the owner on Jan 23, 2023. It is now read-only.
[release/3.1] Add file creation method that takes an ACL#42228
Merged
danmoseley merged 1 commit intodotnet:release/3.1from Oct 30, 2019
carlossanlop:FileCreate31
Merged
[release/3.1] Add file creation method that takes an ACL#42228danmoseley merged 1 commit intodotnet:release/3.1from carlossanlop:FileCreate31
danmoseley merged 1 commit intodotnet:release/3.1from
carlossanlop:FileCreate31
Conversation
Member
|
Please get a review before merging 😃 (to confirm accurate port) |
JeremyKuhne
approved these changes
Oct 30, 2019
Author
|
Thanks for the sign-off, @JeremyKuhne |
Member
|
You can ignore unrelated CI issues |
Dotnet-GitSync-Bot
pushed a commit
to Dotnet-GitSync-Bot/coreclr
that referenced
this pull request
Nov 15, 2019
) Signed-off-by: dotnet-bot <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Approved API Proposal: #41614
Original PR merged in 5.0: #42099
Related change for directory creation method that takes an ACL: #41834 [merged and ported to 3.1 Prev2]
Description
We have extension methods in
System.IO.FileSystem.AclExtensionsthat let the user get and set ACLs for existing files, but we do not have methods that create files with predefined ACLs..NET ACL (Access Control List) support is Windows specific. This change will reside inside the
System.IO.FileSystem.AccessControlassembly.Customer impact
Before this change, customers had to create a file or filestream, then set its ACLs. This presents a few problems:
This change addresses those problems by adding a new extension method that allows creating a file and ensuring the provided ACLs are set during creation.
Regression
This change will not cause a regression.
Risk
Medium-Low:
Testing
Added unit tests that verify the ACLs were correctly set and the expected exceptions are thrown.