* Clear initlocals in a bunch of assemblies
Sets
```XML
<ILLinkClearInitLocals>true</ILLinkClearInitLocals>
```
for the assemblies:
- System.IO.FileSystem
- System.IO.Pipes
- System.Memory
- System.Net.Http
- System.Net.Http.WinHttpHandler
- System.Net.NameResolution
- System.Net.NetworkInformation
- System.Net.Primitives
- System.Net.Requests
- System.Net.Security
- System.Net.Sockets
- System.Net.WebSockets
- System.Net.WebSockets.Client
- System.Net.WebSockets.WebSocketsProtocol
- System.Private.Uri
- System.Runtime
- System.Runtime.Extensions
Eventually we'd ideally set the flag for the whole repo; these are just the ones I audited thus far. In a few cases I had to make code changes to adapt, where the code was expecting stackallocs to be cleared. I also looked at a few other projects (System.Collections, System.Runtime.Numerics) where there were more significant dependencies on clearing and I decided to leave those for later.
* Disable ILLinkClearInitLocals running on Unix until it works there
Commit migrated from https://github.com/dotnet/corefx/commit/f0a032e4a1c8a848574a5db3e69e8a6fa0aae91e
* Reduce Unix enumeration allocations
This change factors out the FileStatus access into a helper struct and adds overloads
for the stat imports that allow passing a span.
The next steps:
- Handle errors manually
- Skip using safehandle
- Look for further opportunities around UTF-8/16 conversion
* Address feedback
Shuffle code around a bit in FileInfo for clarity. Also shift directory determination
to FileSystemEntry to avoid allocation on links.
Commit migrated from https://github.com/dotnet/corefx/commit/c64171e379090b372fe232ec3f27a57ae838406c
* Fix accessing trimmed paths
Paths with trailing spaces or periods are normally trimmed by Windows. They can, however, be created using `\\?\` or be exposed via mapping of remote file systems. This change fixes the ability to work with returned *Info classes on files of this type.
This change also cleans up the Info classes:
- removes non-relevant comments
- removes "display" paths (limited trust holdover)
Also remove dead PathPair class.
* Fix helper for .NET Standard
Commit migrated from https://github.com/dotnet/corefx/commit/e2cd5a8fc468b63255f91f4f28bccddb3bb31e8f
* Windows file enumeration extensibility
This is the Windows implementation of System.IO.Enumeration. It adds
new find options to existing APIs and a public extensibilty model
for richer, low allocation file system enumeration.
The Unix implementation is in progress.
* Initial naive Unix implementation of FileSystemEnumerator
* Move a netcoreapp test to the right group
* Fix WinRT build.
* Address feedback from @danmosemsft
* Remove inline attribute
* Remove IsNameDotOrDotDot property
* Address futher feedback.
* Remove unreferenced common code
Commit migrated from https://github.com/dotnet/corefx/commit/66ada723c1b0ae9062a0e7b0b28862014b985019
* Update PAL
* Revert PAL
* Add SxS struct
* Test
* CompareTo
* Simple creation time test
* CompareTo public
* Simple creation time test
* typo
* Extract method
* CR feedback
* Look for birthtimespec
* Rework to PAL approach
* comment
* typos
* typo
* Comment
Commit migrated from https://github.com/dotnet/corefx/commit/d75610efce77c2f2562c4f35de901ea38b6d43b7
* Fast file enumeration for Windows
Implements an optimized, low allocation replacement for file enumeration on Windows. In preliminary tests this improves performance at least two fold, particularly for recursive searches.
Removes aggressive filter validation.
Copies and cleans up filename matching code from FileSystemWatcher.
Add length setter for ValueStringBuilder.
Remove Unix .. check for enumerable.
Commit migrated from https://github.com/dotnet/corefx/commit/eb0d4388c339288a589bdd7f5e0c9fcd61da4362
* Clean up CreateFile usage.
The "safe" create file was specifically targetted at FileStream and doesn't apply to remaining usages in FileSystem.
Also collapse a few unnecessary methods.
* Missed a file.
* Related UAP changes
* Remove unnecessary qualifiers.
Commit migrated from https://github.com/dotnet/corefx/commit/c3abf82d27ae168cfdb5965bb1a28185800a22ca
* Add tests to validate we don't fall over enumerating files that just cross the legacy MAX_PATH barrier. As we do special logic on Windows to support long paths this is an important boundary to test. While these path lengths don't have special meaning outside of Windows, we'll always run them they should still pass .
* Conditionalize tests for long path support
NetFX needs to have the long path functionality enabled to run these
tests.
Commit migrated from https://github.com/dotnet/corefx/commit/424823b9123729ec990b31666177b6b17905eb1c