Commit Graph
49 Commits
Author SHA1 Message Date
Jeremy Kuhne db81a86a72 Add negative tests for Begin/End
Adds negative tests for Begin/End, removes unnecessary block for `\\.\`
paths.

(The block for `\\.\` paths fulfills a need that predates our supported
Windows OSes. You cannot inadvertently mess up "raw" drives. In addition
we currently allow `\\?\` which is another form of device path access.)


Commit migrated from https://github.com/dotnet/corefx/commit/5376c25bea9523265696ed5806f3dc8b51bbbf25
2016-09-26 16:25:37 -07:00
Jeremy Kuhne 12bee9bc55 Expose Begin/End methods on FileStream
Also add [Obsolete] to the Handle property


Commit migrated from https://github.com/dotnet/corefx/commit/729355a49293078e416bde888dfbbd7fb49e4a37
2016-09-22 21:33:40 -07:00
Jose Perez Rodriguez fe65028e81 Merge branch dev/api
Commit migrated from https://github.com/dotnet/corefx/commit/76676dc565873fdd46d545fadfbbdfe8fd9d464e
2016-09-20 10:27:33 -07:00
Stephen Toub c97b0561ae Use ArrayPool in CopyToAsync in several System.IO streams
- FileStream (already in async on Windows, now for all flavors)
- DeflateStream
- GZipStream
- PipeStream
- UnmanagedMemoryStream


Commit migrated from https://github.com/dotnet/corefx/commit/73c954517c9fbdea29fe1884fb143cb6ab3af4ec
2016-09-14 07:28:19 -04:00
Jose Perez Rodriguez bf0da1a921 Required changes to get the build green again after merge from dev/api
Commit migrated from https://github.com/dotnet/corefx/commit/ed8347041878054db7707d54201779ccba967782
2016-09-13 11:21:48 -07:00
Stephen Toub abc4973a51 Add missing APIs to System.IO.FileSystem
Adds:
- File.WriteAllLines(string, string[])
- File.WriteAllLines(string, string[], Encoding)
- File.Replace(string, string, string)
- File.Replace(string, string, string, bool)
- File.Encrypt(string)
- File.Decrypt(string)
- FileInfo.Encrypt()
- FileInfo.Decrypt()
- FileStream.Handle
- FileStream.Lock(long, long)
- FileStream.Unlock(long, long)

Currently throws PlatformNotSupportedException from:
- Encrypt/Decrypt on all platforms.  These can be implemented on Win32, but the APIs needed are not currently exposed as allowed in buildtools.
- Lock/Unlock on Unix and WinRT.  These can be implemented on Unix; I just didn't in this commit.


Commit migrated from https://github.com/dotnet/corefx/commit/2fbc772ea8bd83a37b9f26c1a7c928a6be2d2c0b
2016-09-12 20:32:59 -04:00
Jose Perez Rodriguez 1105adec7a Merge remote-tracking branch 'mainrepo/dev/api' into MergeDevApi
Commit migrated from https://github.com/dotnet/corefx/commit/a1989d82cff273db667638e4836ea7836f5c6eb9
2016-09-12 15:20:12 -07:00
Stephen Toub a2f1dade91 Add tests for FileStream.CopyToAsync
Commit migrated from https://github.com/dotnet/corefx/commit/eb3622c6e2947382e3c546cac0fc98213c13d4ca
2016-09-10 13:42:33 -04:00
Stephen Toub 03d9aaf411 Fix FileStreamBase Begin/End race condition
The new FileStreamBase.Begin/End overloads do argument and state validation similar to that of desktop.  There is a subtle but critical difference, however: in this validation, desktop checks to see whether the stream is closed via ```_handle.IsClosed```, whereas FileStreamBase does it via ```SafeFileHandle.IsClosed```.  ```SafeFileHandle``` is an abstract property that returns the handle... but it also flushes.  The base Stream's Begin/End implementation has synchronization to ensure that only one async operation is in flight at a time, but this call to ```SafeFileHandle.IsClosed``` comes before that synchronization kicks in (it's in the base), and as such we end up potentially having a Flush invocations concurrently with Write invocations (Write is called asynchronously from the base BeginWrite), which is very unsafe.

This commit fixes it by adding an IsClosed property that goes directly to the underlying handle, bypassing the publicly exposed SafeFileHandle (that flushes so that direct access to the file via the handle is consistent with operations already performed on the FileStream).

(I also fixed a small issue in the ManyConcurrentWriteAsyncs that highlighted the issue.  Order of async read/write operations is only guaranteed on FileStream when in async mode; in non-async mode, it's theoretically possible (though unlikely) for operations to complete out-of-order, but the test is validating that the operations completed in order.  While I've never seen this fail, I'm proactively fixing it.)


Commit migrated from https://github.com/dotnet/corefx/commit/5afb9f69400cbb61971a7eeb4fcfc49fbbc1080b
2016-09-02 11:48:36 -04:00
Jose Perez Rodriguez a27ef1f7be Reving up the versions of the contracts where we have added Apis for netcoreapp1.1 (dotnet/corefx#10531)
Reving up the versions of the contracts where we have added Apis for
netcoreapp1.1

Commit migrated from https://github.com/dotnet/corefx/commit/62334804aa655a250838eefed68553f357ebec5f
2016-08-04 13:05:12 -07:00
Stephen Toub 1103f1f4fc Fix FileStream.Flush on Unix when wrapping non-synchronizable descriptors
FileStream can be used with any arbitrary file descriptor on Unix.  FileStream.Flush may use FSync to try to synchronize the file's state with the storage device, but that only makes sense and works for certain kinds of file descriptors.  For other file descriptors, currently we're throwing an exception if the operation fails, when really we should just ignore the failure, as there's no work to be done.


Commit migrated from https://github.com/dotnet/corefx/commit/1994ac4a43105cda48c2fbcdf967d6ae48330e0e
2016-07-16 21:49:13 -04:00
Stephen Toub 504635be9c Reduce FileSystem outerloop test time
Changes:
- An outerloop test verifying that we would throw when trying to use File.ReadAllBytes to read a > 2GB file was first writing out 2GB worth of data to disk.  We can instead just create a FileStream and explicitly change its length.  On my machine, this changes the execution time of that test from ~25s to just a few milliseconds.
- Two "mini stress" tests are enabled in outerloop and are explicitly coded to run for 30 seconds doing lots of reading and writing.  I've changed these to be 10 seconds.


Commit migrated from https://github.com/dotnet/corefx/commit/e4c1fed1843c2dc80b9b345d6fac0251e865a227
2016-06-17 13:13:23 -04:00
Stephen Toub c5f340f810 Fix several IO tests and remove some stale ActiveIssue
Commit migrated from https://github.com/dotnet/corefx/commit/d8a923f8d15a1fea42bcdd641cde00ca58f57c04
2016-06-01 12:49:28 -04:00
Stephen Toub f9aa7a1e29 Change FileStream async default back to false
FileStream's ctors allow the creator of the stream to specify whether asynchronous I/O should be used.  The default in the full framework is false.  When FileStream was ported to corefx, the default was changed to true.

Such a default of true can be beneficial, as it means that ReadAsync/WriteAsync calls on streams created without overriding that default will naturally use overlapped I/O on Windows, which can lead to better scalability and performance.  However, there are other ramifications, in particular for existing code and code written to be portable across .NET implementations.  For example:
- Using Read/Write on a stream created with useAsync=true ends up blocking as calls around Read/WriteAsync, making them more expensive than they'd otherwise be.  So existing code that uses a FileStream for simple read/writes may actually get slower.
- The SafeFileHandle exposed from the FileStream naturally is associated with that particular async setting, such that attempting to use it to construct a FileStream with a conflicting setting will fail with an exception.
- FileStreams constructed with useAsync=true have special behaviors around how the position of the stream is updated after an async operation is initiated, which means code written expecting one default may fail when run with a different default.
- Etc.
While there are benefits to changing the default, the cons outweigh the pros.  A developer can always opt-in to useAsync=true, but it's better to keep the default consistent across all implementations, especially for code written to be portable across those implementations.  This commit changes it back to be false.


Commit migrated from https://github.com/dotnet/corefx/commit/08991e80aa6ce5ab7e43265b30824a91f6112db4
2016-05-18 07:31:12 -04:00
Lakshmi Priya Sekar fb75367b90 Fix formatting.
Commit migrated from https://github.com/dotnet/corefx/commit/36058b99eb5fd3874cd43b1aa366f924f42fe18f
2016-04-04 15:51:50 -07:00
Lakshmi Priya Sekar 9b2eefd56c Add IsNotWindowsNanoServer to Platform detection.
Disable failing Windows Nano tests.


Commit migrated from https://github.com/dotnet/corefx/commit/16909dea9f9661ccff4364770cb21e975a5d291b
2016-04-04 14:24:33 -07:00
Ian Hays 9d790f57d4 Add missing tests to System.IO.FileSystem
Adds missing tests to achieve strictly higher coverage than ToF and also adds some other new tests and cleans up existing tests.


Commit migrated from https://github.com/dotnet/corefx/commit/09e70d429a7c89abed1514a90667e0088f903d4c
2016-03-31 11:11:17 -07:00
stephentoub 11bb3f3c94 Remove and replace some stale [ActiveIssue(...)]
Remove some stale [ActiveIssues] where the tests now pass.

Replace some others with [PlatformSpecific], where the behavior is deemed to be "by design" / accepted.

And update a few issue numbers.


Commit migrated from https://github.com/dotnet/corefx/commit/9c13b0c9389189d86fb2d270c28660946b3ae80c
2016-03-25 15:24:49 -04:00
Jon Hanna c13188394b Fix multiple typos
Commit migrated from https://github.com/dotnet/corefx/commit/4bfc0ab963a7880c0d4b90b82317fe65d7842eba
2016-03-20 14:36:30 +00:00
stephentoub 757ca58bc1 Avoid faliing in UnixFileStream if flock isn't supported
flock on OSX can fail with ENOTSUP if "the referenced descriptor is not of the correct type", e.g. if it's a FIFO.  Since we don't want to entirely prevent usage of FileStream with such file types on OSX, and since locking is already advisory only, this change just ignores rather than throws when flock fails with ENOTSUP.


Commit migrated from https://github.com/dotnet/corefx/commit/38177bc1de3a73ef5e8b5f449478ea588406a4b4
2016-03-15 19:50:12 -04:00
dotnet-bot b32ddb5d98 Deploy nameof throughout corefx in MemberData
Commit migrated from https://github.com/dotnet/corefx/commit/9c3156b9ada06b8e58ac53d48fc303500bf3e476
2016-02-18 23:58:15 -05:00
Lakshmi Priya Sekar 033caf14d4 Disable failing test dotnet/corefx#6153.
Commit migrated from https://github.com/dotnet/corefx/commit/25e77e11dbc57363842389d5c022bdaf00d9d705
2016-02-16 18:14:27 -08:00
stephentoub 787741715f Use System.Buffers in CopyToAsync implementations
The default CopyToAsync on Stream uses an 80K temporary buffer, making it a good candidate for buffer pooling.  But Stream is in mscorlib and can't rely on System.Buffers.  So this commit introduces an implementation that streams in mscorlib can use, just by overriding CopyToAsync and delegating.  It then uses that in DeflateStream, GZipStream, FileStream, PipeStream, and UnmanagedMemoryStream.


Commit migrated from https://github.com/dotnet/corefx/commit/34ce38bc1517e8b7693223a9e41479dd24abc59a
2016-02-09 11:34:19 -05:00
dotnet-bot 39d1eab950 Update licensing headers
Commit migrated from https://github.com/dotnet/corefx/commit/7cad8486cbabbce0236bdf530e30db7036335524
2016-01-27 08:02:28 -08:00
stephentoub 94a6b74a7e Remove stale TODO in SafeFileHandle test
Commit migrated from https://github.com/dotnet/corefx/commit/cabe44c6dd6ebc405c995e3a89a782e871aae7dd
2016-01-04 13:50:06 -05:00
Nate Amundson c1571f42f9 Make unit tests async to work with 1 thread
Currently, the tests System.IO.Tests.FileStream_SafeFileHandle.
ThrowWhenHandlePositionIsChanged and System.Net.NetworkInformation.
Tests.UnixPingUtilityTests.PacketSizeIsRespected hang when running on a
Unix machine with 1 thread.  Declaring the tests async fixes this issue.


Commit migrated from https://github.com/dotnet/corefx/commit/6d15aa69e332866e6282994edfd2de5ca0192899
2015-12-14 18:21:49 -06:00
Stephen A. Imhoff a8ce720bd6 Update test namespace in System.IO.FileSystem
Update test namespace where applicable.
Cleanup `using`s in updated files.


Commit migrated from https://github.com/dotnet/corefx/commit/5b5717c2eb8fc88ed5bd59babe39890c581ad622
2015-09-25 21:30:57 +09:00
stephentoub 8f85a391bf improve FileOptions tests for FileStream
We didn't have any tests for the DeleteOnClose behavior with FileStream.  We also weren't testing combinations of FileOptions, nor validating that we could read/write files created with non-default options.


Commit migrated from https://github.com/dotnet/corefx/commit/63efcbf5ae19883cd9bc9aa10703a681be1c73ea
2015-09-23 14:57:24 -04:00
stephentoub b07d619076 Reduce FileSystem inner loop test time from 90 to 5 seconds
Three tests were consuming the vast majority of the time:
- DirectoryLongerThanMaxLongPathWithExtendedSyntax_ThrowsPathTooLongException. It was taking 70 seconds on my machine.  I moved it to outer loop.
- ManyConcurrentWriteAsyncs.  It uses a MemberData that results in it executing ~40 times, for a combined time of around 7 seconds on my machine.  I made one combination run in inner loop and moved the rest to outer.
- CopyToAsyncBetweenFileStreams.  Same MemberData, same solution.


Commit migrated from https://github.com/dotnet/corefx/commit/03205295cc6834b1fdcd8b7ba364515f4ec7164a
2015-09-12 19:46:49 -04:00
stephentoub 26253f6265 Add more tests for FileStream
- Mainly, I added several tests (with lots of theory-based parameterized inputs) to stress WriteAsync: many concurrent writes, long chains of writes, etc., for various size inputs and buffers, async vs not, etc.
- There were multiple variations on Flush tests based on whether to use Flush(), Flush(false), or False(true).  I combined these all into single theories.
- I then added some more Flush tests for some missing cases highlighted by code coverage, e.g. flushing reads.
- I then duplicated these tests for FlushAsync, and added some additional tests specific to FlushAsync, e.g. cancellation.
- I added a few tests for pipes.


Commit migrated from https://github.com/dotnet/corefx/commit/bb34d5a458613faa39d3808a8a352e62e3bcf52f
2015-08-24 16:59:59 -04:00
tymlipari 4113737a6e Handle internal overflow of the write buffer in WriteAsync by introducing new cases:
1) Internal buffer overflows, but write can fit in next buffer - Fill the existing buffer, copy the remaining data into a new buffer, and flush the original to disk

2) Internal buffer is non-empty, overflows, and the remaining data won't fit in a second buffer - Chain the flush operation to a second write operation which writes the entire incoming block directly to disk.

Additionally, adds a new unit test to ensure the different buffering cases are being covered.


Commit migrated from https://github.com/dotnet/corefx/commit/b69caa929d3cb3b87574ee31a651d799f61e3a75
2015-08-24 16:50:56 -04:00
stephentoub d6467ac0af Use RuntimeInformation across corefx for platform detection
This commit deletes our temporary Interop.PlatformDetection.cs mechanism and replaces usage of it with usage of System.Runtime.InteropServices.RuntimeInformation.dll.


Commit migrated from https://github.com/dotnet/corefx/commit/6861b625b391566544be9a60356c8c03b15e5fb5
2015-08-06 10:25:17 -04:00
Ian Hays a9766775b0 - Added an overload to GetTestFilePath that takes an integer index parameter to add to the generated filename so that calls to the function within loops will be able to differentiate themselves
- Resolves dotnet/corefx#1434


Commit migrated from https://github.com/dotnet/corefx/commit/1dbfabb32d61a8c2db25c82bb22743bcc15c2ccb
2015-07-29 15:23:33 -07:00
Ian Hays 8d7c94172a - Resolves dotnet/corefx#2458. FileInfo.Open(FileMode.Append) didn't allow appending per so I modified FileInfo to allow it
- References dotnet/corefx#2460. File.Move and FileInfo.MoveTo no longer always overwrite the destination file; added a non-concurrent validity check to MoveFile in the Unix implementation to serve as a temporary solution.
- Resolves dotnet/corefx#2459. Reenabled Directory_CreateDirectory.DriveLetter_Unix as it's previous failures were not the fault of the method but of the system.
- Added test checks to work around the issue in dotnet/corefx#2537 until a final decision is reached for the desktop.
- Added Interop.Link to the Interop files for the (possible) implementation of File.Move
- Consolidated all of the related files that did nothing but inherit from other classes (e.g. File_GetFiles_str and File_GetFiles_str_str were consolidated into File_GetFiles)
- Removed the "partial" keyword from some test classes
- Finished overhauling all test cases that don't directly require solutions to Build System issues before being re-added (e.g. those that require networked drives or altering the current directory)
- Added some tests to increase code coverage slightly in some cases.
- All classes and files have been renamed to match the standard set by FileStream: only include parameters in the test/class name if there are overloads
- Modified the Unix behavior for distinguishing between a FileNotFoundException and a DirectoryNotFoundException to match that of Windows.
- Removed some redundant error checks that never catch
- DirectoryInfo.MoveTo(destPath) did not have checks for destinations with paths that are over MAXPATH. I added them to better match the behavior and error timing of Directory.Move(source, dest).


Commit migrated from https://github.com/dotnet/corefx/commit/481d5c645763da79145af50d123db3f4041aa05e
2015-07-29 08:04:18 -07:00
stephentoub f574e42e5c Fix FileSystem tests for Unix
A bunch of the FileSystem tests assume that certain paths are always invalid, but many such paths are valid on Unix.  This commit fixes the tests that are failing after the revised Path implementation.


Commit migrated from https://github.com/dotnet/corefx/commit/f0882d6673308cded7726cd5f3fd8e2b448a3415
2015-07-06 20:53:20 -04:00
Alex Ghiondea 5bc19a13ab Port CS1469287 from ProjectN to ProjectK via FXMain
[tfs-changeset: 1469367]


Commit migrated from https://github.com/dotnet/corefx/commit/9c3b459ae51da4665ccd420f92effac6255523fd
2015-05-12 14:29:10 -07:00
Daniel Paoliello 23457c0c44 Fix for Issue dotnet/corefx#587: Modified Win32FileStream.FileStreamAsyncResult to be using a TaskCompletionSource, modified the core Read\Write methods to return Tasks, and so removed the internal Begin\End methods since they are no longer required. Also added a pair of "mini-stress" tests for ReadAsync and WriteAsync as OuterLoop tests.
Commit migrated from https://github.com/dotnet/corefx/commit/aca535e12bf3642cff2f725cbe97cd31e01a5f9c
2015-04-26 12:50:13 -07:00
Stephen Toub d7103cea8c Fix UnixFileStream.Seek buffering with SeekOrigin.Current
UnixFileStream.Seek was dumping the read buffer as desired, but with a SeekOrigin.Current, it wasn't factoring in the read buffer information into the offset (the fact that we have a read buffer means that the caller's definition of "Current" doesn't match the actual underlying file descriptor's position).  This fix just updates the offset (as is correctly done in similar code in the Win32FileStream implementation) based on how much data we have in the read buffer.

I've also added a seek test that repeatedly seeks around and reads data.  It blows up without the fix and passes with it.


Commit migrated from https://github.com/dotnet/corefx/commit/563f4977543f483ce1a5df8b9ffd9f96ffe0921f
2015-04-24 13:43:09 -04:00
Matt Ellis 6cb12f9218 Merge pull request dotnet/corefx#1437 from ellismg/disable-failing-test
Disable failing test

Commit migrated from https://github.com/dotnet/corefx/commit/a1ab41cbd7d3435aed4e98132617fba03675cd31
2015-04-19 22:10:25 -07:00
Matt Ellis 47439e20a7 Disable failing test
ValidFileOptions test is failing.  Disable it.


Commit migrated from https://github.com/dotnet/corefx/commit/71d167bc7342360c6b0c9ed255df95efdbad816a
2015-04-19 21:50:02 -07:00
Stephen Toub cdf97700fa Fix System.IO.FileSystem product source and tests for Linux
Prior to this set of changes, 110 of the FileSystem tests were failing on Linux.  After this change, all allowed tests pass.

Primary product fixes:
- Using rmdir/unlink for directory/file deletion rather than using remove
- Disallowing FileStreams to be opened for directories
- Supporting copying files when only target directory (not target name) is specified
- Overhauling directory enumeration to ensure to match Win32 behaviors related to search pattern normalization, input validation, supporting re-iteration through an enumerable, outputting partial paths based on user-supplied path, using a SafeHandle to ensure resources are cleaned up
- Fixing FileSystemObject.LastWriteTime to correctly return the LastWriteTime rather than LastAccessTime
- Fixing FileAttributes.ReadOnly handling due to inappropriate caching
- Validating inputs to FileSystemObject.Attributes, and make sure that changes to attributes are visible afterwards
- Adding support for getting CreationTime if it's supported by the OS
- Marking links with FileAttributes.ReparsePoint
- Working around current runtime bug related to exception handling and finally blocks getting executed twice

Primary test fixes:
- Suppressing tests as platform-specific that dependend on Win32-isms like drive letters, alternate data streams, etc.
- Changing a bunch of '\' usage to instead use Path.DirectorySeparatorChar or Path.Combine
- Adapting to behavioral differences between Windows and Unix, e.g. whether a directory can be deleted if it's readonly, invalid path characters, max path lengths, file sharing differences, etc.

These changes should all accrue to OSX as well, but we'll need to separately do an exercise to clean this library and tests up there for anything OSX-specific.


Commit migrated from https://github.com/dotnet/corefx/commit/dd48c9dc1f0a7142a005ff1d4c162e10facda306
2015-04-10 13:13:34 -04:00
Stephen Toub b7aafbcdf5 Fix FileStream tests on Linux
There are 338 System.IO.FileSystem tests currently passing on Windows.  On Linux, 65 of these are currently failing, mostly negative tests expecting a certain exception and getting a different actual one or none at all.

This commit fixes 40 of those, mostly via product fixes, plus a few test tweaks (where the test was based on something specific to Windows), such that now only 25 are failing.  Of those 25, 24 are tests for FileSharing that are expecting exceptions not being generated on Linux because that support isn't available in the library; we'll most likely just disable these tests for Linux.  The remaining 1 test fails because it's expecting ReadAsync to complete synchronously if the read can be satisfied from the read buffer, and the current ReadAsync/WriteAsync implementations just delegate to the base class for functionality; we already have a work item open to eventually address that.


Commit migrated from https://github.com/dotnet/corefx/commit/8062cc0dbed1ad31b9e6d438ddc71d91ee066031
2015-03-23 02:41:20 -04:00
Nick Guerrera f076e50a56 Merge pull request dotnet/corefx#565 from dotnet/v1.0
Merge v1.0 to master

Commit migrated from https://github.com/dotnet/corefx/commit/593d5b40e188ba23f656fd93efabdff390048b34
2015-01-29 19:13:11 -08:00
Eric StJohn 485f6da00e Testing the return value of Seek
Commit migrated from https://github.com/dotnet/corefx/commit/9288809a29883edbcd58c0a51ee7bd3b13be278e
2015-01-29 08:51:20 -08:00
Eric StJohn 2f422d1fba Refactoring CompletesSynchronously to better test the that an async method completes synchronously.
Commit migrated from https://github.com/dotnet/corefx/commit/a35bcce6f747981e830a3824aad62503c6da12e2
2015-01-29 08:50:51 -08:00
Eric StJohn 09489674ad Adding tests for FileStream.
Commit migrated from https://github.com/dotnet/corefx/commit/75dd80ef6fc260e8d5dca8458d8baf9e3faa35a7
2015-01-23 10:57:01 -08:00
joshfree e3fa23c56e Trivial cleanup to use Assert.True(x) and Assert.False(x)
Search and replace across all tests :
  Assert.Equal(true, x); => Assert.True(x);
  Assert.Equal(false, x); => Assert.False(x);

Changed files:
  System.Collections.NonGeneric.Tests.dll
  System.IO.FileSystem.Tests.dll
  System.Reflection.Metadata.Tests.dll


Commit migrated from https://github.com/dotnet/corefx/commit/1199340b63d39afc47d502a7474c777a07a89ad3
2015-01-15 16:43:31 -08:00
Eric StJohn 3bd6b8da9b Add test assertions for exception members of FileStreeam.ctor(string, fileMode) tests.
Commit migrated from https://github.com/dotnet/corefx/commit/be8527cc02ddf065ff0cab1ddecd93b92e245dc6
2014-12-30 15:52:36 -08:00
Eric StJohn 6923cfab70 Add projects for FileSystem and FileSystem.Primitives. Add tests for FS.Primitives and the begining of tests for FileSystem.
Commit migrated from https://github.com/dotnet/corefx/commit/5b0e138913de4854ed2a4c627fa75362413d2010
2014-12-29 12:45:05 -08:00