* 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
* Enable compiling the test projects against the configuration
The tests were compiled using the vertical configuration and not the best configuration picked from Configurations.props. this change is fix that and have all test projects configured accordingly.
This change ensuring netcoreapp runs successfully and we'll have another rounds later for other configurations like netfx, UAP...etc.
* Fix openssl test project on Linux distros
* Update the project configurations
* Update VS solution files
* update solution files
Commit migrated from https://github.com/dotnet/corefx/commit/e79912f8b77bc22abfd85e94b74c06e5d99e8381
This breaks out the nested FileStream in preparation for
moving the code down to corlib.
Will follow up with:
1. Rename of files (from Unix/Win32FS to FS.os.cs)
2. Moving of common code to FileStream.cs
3. Copy to corlib
4. Move ref to System.Runtime and type forward to corlib
5. Further prep work for bringing up UAP 10.1
Commit migrated from https://github.com/dotnet/corefx/commit/e3fc18c58396737ee5e6bc80acf508031d63cc8e
This adds the bits necessary to build the System.IO.FileSystem assembly for FreeBSD. I moved the Interop.posix_fdadvise.cs from Linux to Unix, since that system call is identical between Linux and FreeBSD. That file is only used for Linux and FreeBSD.
Commit migrated from https://github.com/dotnet/corefx/commit/1dd39be66ac96730992dd89ff775b245582d42b7
Previously, we used the catch all OS=Unix property in MSBuild to
determine if we were building for Windows vs Unix, and we shared the
same MSIL between Linux and OSX. However, we have already started to
take dependencies on Linux specific APIs and we plan on using OSX
specific APIs very soon.
We don't want to try to ship MSIL that contains both Linux and OSX
specific implementations of a feature, so the build system needs to
change a little.
We'll continue to use the OS property as the entry point for the build
to specificy what platform you want to build for. However, we now have
three platforms:
1. Windows_NT
2. Linux
3. OSX
However, the value of the OS property should not be tested directly,
instead we introduce properties about the target platform itself:
1. TargetsWindows
2. TargetsUnix
3. TargetsLinux
4. TargetsOSX
Code which works the same across Linux and OSX should be guarded by
TargetsUnix (which is true when OS is either 'Linux' or 'OSX'). Code
specific to one OS can be guarded with either TargetsLinux or
TargetsUnix.
In this change, I have simply rewritten all the '$(OS)' == 'Unix'
conditions to '$(TargetsUnix)' == 'true'. A few libraries may do Linux
specific stuff, but we will clean up that debt when we go to flesh out
the OSX implementations.
Commit migrated from https://github.com/dotnet/corefx/commit/4d07173fbf86631d49ed56623581eff9cb7d3f87