Repository navigation
Cleanup FileSystem provider - #6909
Merged
Ilya (iSazonov) merged 5 commits intoJun 4, 2018
Merged
Ilya (iSazonov) merged 5 commits into
Ilya (iSazonov) merged 5 commits into
Conversation
Ilya (iSazonov)
requested review from
Bruce Payette (BrucePay) and
Andrew (anmenaga)
as code owners
May 21, 2018 13:52
IO.FileInfo does not make system calls in constructor. So we can create the object and then use the required attributes.
Ilya (iSazonov)
force-pushed
the
psl-clean-winsafegetfileattributes
branch
from
May 21, 2018 14:17
d850ef5 to
ebe19a5
Compare
Ilya (iSazonov)
requested review from
Steve Lee (SteveL-MSFT) and
Dongbo Wang (daxian-dbw)
May 21, 2018 14:18
Ilya (iSazonov)
force-pushed
the
psl-clean-winsafegetfileattributes
branch
from
May 22, 2018 08:42
4b1fe47 to
ef7430c
Compare
Dongbo Wang (daxian-dbw)
requested a review
from Aditya Patwardhan (adityapatwardhan)
May 22, 2018 17:38
Aditya Patwardhan (adityapatwardhan)
approved these changes
May 23, 2018
Collaborator
Author
|
Steve Lee (@SteveL-MSFT) Dongbo Wang (@daxian-dbw) Could you please look the PR? |
6 of 11 tasks
Steve Lee (SteveL-MSFT)
approved these changes
May 31, 2018
Collaborator
Author
|
Dongbo Wang (@daxian-dbw) Seems the PR is ready to merge - could you please look? |
7 of 11 tasks
3 tasks
8 of 22 tasks
Thatgfsj (Thatgfsj)
pushed a commit
to Thatgfsj-contribs/PowerShell
that referenced
this pull request
Aug 6, 2026
The cleanup is coming from a code review to cleanup psl. Here we clean up the side branch of the code that will allow later to clean up a branch which uses psl. - IO.FileInfo does not make system calls in constructor. So we can create the object and then use the required attributes without direct call IO.FileInfo.GetAttributes() ( SafeGetFileAttributes() ). This allow us to exclude some p/invoke calls in our code in later cleanups. Also we get unified code for both Windows and Unix. - Remove SafeGetFileAttributes() and WinSafeGetFileAttributes(). Currently .Net Core support file attributes on all platforms in fastest way and we can remove our workaround. We get a regression in rare case (for files like pagefile.sys). Fix is ready in CoreFX, we get it in 2.1.1. I suggest ignore the regression because this is a very-very rare situation (Get-ChildItem c:\pagefile.sys -Hidden). The .Net Core team was not even able to create an artificial test for such files and uses a real pagefile.sys file for the test. Also the enumeration is still working (dir c:\ -hidden). - Re-add test which we lost in PowerShell#4050. The test is pending because of the regression.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
PR Summary
Related #6874. The PR is coming from a code review to cleanup psl. Here we clean up the side branch of the code that will allow later to clean up a branch which uses psl.
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:to the beginning of the title and remove the prefix when the PR is ready.[feature]if the change is significant or affects feature tests