Commit Graph
20 Commits
Author SHA1 Message Date
Eric StJohn ebf15ad34b Routing virtual calls from internal FileStream implementations through public FileStream so that derived FileStreams can override the behavior. Also eliminating all virtual calls from construction.
Commit migrated from https://github.com/dotnet/corefx/commit/1a9bc4b949749b68f70048d0fe85168bea735122
2015-01-23 10:55:38 -08:00
Matt Cohn 06d79a728d Merge branch 'master' into netcore
Commit migrated from https://github.com/dotnet/corefx/commit/c94808955e5557e902c20e640c6e8fb7d5115b3a
2015-01-12 19:03:39 -08:00
Matt Cohn 17ac717a13 Port test libraries to netcore xunit
Commit migrated from https://github.com/dotnet/corefx/commit/38714568bdcb3477486783e5cfbc2ba24d678186
2015-01-12 19:02:47 -08:00
Stephen Toub e945f727db Address PR feedback to use char.ToString()
Commit migrated from https://github.com/dotnet/corefx/commit/b1cfa0dfc8db08f97470a22bb12afebbe841090c
2015-01-12 01:06:42 -05:00
Stephen Toub 93d8242941 Remove unnecessary char-related allocations
This commit removes several unnecessary char-related allocations in System.IO.FileSystem.  Most of them stemmed from appending the DirectorySeparatorChar to a string, which results in the compiler using String.Concat(..., object) for the concatenation, which means the char gets boxed.  Others stemmed from array allocations that could have been cached, e.g. allocating an array for the directory separator chars on each call to TrimEnd.

In fixing these, I also noticed and fixed a few places where duplicated logic could be replaced with a call to IsDirectoryChar.


Commit migrated from https://github.com/dotnet/corefx/commit/b5d327ac0ad50488c801b716b69521be6a6720c9
2015-01-11 20:29:29 -05:00
Alexander Köplinger 3be6bb17ce Remove unused namespace and fix package reference in FS
The System.Runtime.Serialization namespace isn't defined in any of the
NuGet packages and is not used in the project, so it can be removed.

The System.IO.FileSystem tests were missing a reference to
System.Runtime.Handles in packages.config (SafeHandle is defined there).

This fixes compilation errors on the Mono compiler.


Commit migrated from https://github.com/dotnet/corefx/commit/11f161176d4b1823f47d35d651a027a892f4e1ad
2015-01-08 21:26:52 +01:00
Alexander Köplinger 1d07acf933 Canonicalize MSBuild ToolsVersion to 12.0
Like 57cffc78, but for the recently added projects.


Commit migrated from https://github.com/dotnet/corefx/commit/fc09d0ab4b31d64744f3aa052bde3419d9be5af9
2015-01-08 14:28:58 +01:00
Stephen Toub b21e5eb709 Merge pull request dotnet/corefx#351 from stephentoub/removefilestreamclosure
Avoid unnecessary closure in Win32FileStreamAsyncResult

Commit migrated from https://github.com/dotnet/corefx/commit/267b8c1edebc1ed5d238db256c412c8a874a62f7
2015-01-06 17:54:11 -05:00
Stephen Toub 935dd387e8 Merge pull request dotnet/corefx#349 from stephentoub/taskhelpers
TaskHelpers cleanup

Commit migrated from https://github.com/dotnet/corefx/commit/cbdab07eb48962aeca89eb42e3576c4daf8ec84e
2015-01-06 17:44:35 -05:00
Stephen Toub be82c7d600 Fix missing file updates from System.IO.FileSystem
When System.IO.FileSystem was added to the repo, changes made to SafeFileHandle did not migrate with it.  There was also a file reference missing from the .csproj file.  Both of these broke the Unix build.  This change just brings those back in sync.


Commit migrated from https://github.com/dotnet/corefx/commit/49ea84c45b466d90ef4490a49976ea7b498287a0
2015-01-06 17:26:54 -05:00
Stephen Toub 9449b84160 Avoid unnecessary closure in Win32FileStreamAsyncResult
Commit migrated from https://github.com/dotnet/corefx/commit/d48889085f8f7391c1958ffbf5d951f3ea3d6487
2015-01-06 12:04:34 -05:00
Eric StJohn bcf12fecdd Updating stale comment that referred to the unusual behavior of FileSystem's ReadLinesIterator.
Commit migrated from https://github.com/dotnet/corefx/commit/e350515a0bfe627542c49cb04691c1df94712963
2015-01-06 08:54:04 -08:00
Stephen Toub bb67b01d51 TaskHelpers cleanup
TaskHelpers.cs is a temporary stop-gap for assemblies that don't yet depend on the latest System.Threading.Tasks contract. This change removes the dependency for those assemblies that do, changing them to use the Task.CompletedTask, Task.FromCanceled, and Task.FromException members on Task instead of the corresponding workarounds on TaskHelpers.  This file should eventually go away entirely.


Commit migrated from https://github.com/dotnet/corefx/commit/325e24de73b86c2b1f920109afe06faedb42b3d8
2015-01-06 09:23:52 -05: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 48a3156ab1 Update style of FileSystemTest to match guidelines.
Commit migrated from https://github.com/dotnet/corefx/commit/3f2d06d971fa5ca0c42d8bb0c354b6eef046f68e
2014-12-30 14:40:30 -08:00
Eric StJohn 874cbd5d8b Fix API comments on FileSystem enums to have valid XML.
Commit migrated from https://github.com/dotnet/corefx/commit/4eedcb11fe8c6f72f9be4813b69c026dbba29c42
2014-12-30 14:39:50 -08:00
Eric StJohn 3b16d158af Split PathInternal between Windows and Unix implementation since platforms have different invalid path characters. Fix issue with FileStream where it was throwing for valid chars (* and ?) on Unix.
Commit migrated from https://github.com/dotnet/corefx/commit/d9607338af7bb376f227438f67fe09280b919564
2014-12-30 14:36:27 -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
Eric StJohn 4ee2e489bb Addressing API feedback for System.IO.FileSystem.
This change adds (back) the following APIs:
Directory.GetParent
Directory.GetCreationTimeUtc
Directory.SetCreationTimeUtc
Directory.GetLastAccessTimeUtc
Directory.SetLastAccessTimeUtc
Directory.GetLastWriteTimeUtc
Directory.SetLastWriteTimeUtc
File.Create(..., FileOptions options)
File.GetCreationTimeUtc
File.SetCreationTimeUtc
File.GetLastAccessTimeUtc
File.SetLastAccessTimeUtc
File.GetLastWriteTimeUtc
File.SetLastWriteTimeUtc
string[] File.ReadAllLines(...)
FileInfo.IsReadOnly
FileSystemInfo.CreationTimeUtc
FileSystemInfo.LastAccessTimeUtc
FileSystemInfo.LastWriteTimeUtc
FileAttributes.IntegrityStream
FileAttributes.NoScrubData


Commit migrated from https://github.com/dotnet/corefx/commit/9698f579f05430e29a9149b3a4a7e5b17f76fb4b
2014-12-23 12:12:49 -08:00
dotnet-bot a59e0991e6 Initial commit of System.IO.FileSystem and System.IO.FileSystem.Primitives
Commit migrated from https://github.com/dotnet/corefx/commit/fda256397e23e60a15a4f0639783d99bd55069b4
2014-12-19 11:45:04 -08:00