Commit Graph
1272 Commits
Author SHA1 Message Date
Tom Deseyn d23cf5eee1 Unix: change SetCreationTime to match better with GetCreationTime (dotnet/corefx#33647)
* Unix: change SetCreationTime to match better with GetCreationTime

* Improve test

* Improve test further

* Update test

* Fix test

* Update test comment


Commit migrated from https://github.com/dotnet/corefx/commit/402e8c089679a925bedf981ccfcb1bd89c3510ca
2018-11-23 12:59:17 -08:00
Alexis Christoforides a3a1f8eaf9 Re-initialize DirectoryInfo.Name after a MoveTo() operation (dotnet/corefx#33496)
Fixes https://github.com/dotnet/corefx/issues/33490

Commit migrated from https://github.com/dotnet/corefx/commit/57637ac83b75e0f2f9a16c56c921d65f9f40f137
2018-11-14 13:54:43 -08:00
Stephen Toub 385e67766d Expose\test FileStream.DisposeAsync
Commit migrated from https://github.com/dotnet/corefx/commit/7ee03fafb78e342381c8d68ee3e6bd2a9d64d0a7
2018-11-12 10:17:35 -05:00
Wes Haggard 954fb511b3 Rename AssemblyKey properties to StrongNameKeyId as part of arcade work
Commit migrated from https://github.com/dotnet/corefx/commit/7edd861bf2dd59ecdb4284e0fd291d7458198a9d
2018-10-30 15:14:01 -07:00
Blake Hensley 4c89c0460c Add overloads to File.Move and FileInfo.MoveTo that accept overwrite parameter (dotnet/corefx#31511) (dotnet/corefx#33054)
* Initial work on implementing File.Move with overwrite

* Add unit tests for File.Move and FileInfo.MoveTo with overloads for overwrite

* Add MoveFile overload with overwrite parameter to Unix

* Correct namespace for Unix function call

* Separate corefx-specific tests

* Move corefx-specific tests to correct ItemGroup

* * Consolidate error blocks
* Pass named argument for readability

* Remove MOVEFILE_WRITE_THROUGH

* Remove const declaration for MOVEFILE_WRITE_THROUGH since it's not used.


Commit migrated from https://github.com/dotnet/corefx/commit/40364e539572e9dad9c8a2eb165fc9af28e5664a
2018-10-26 19:28:35 -07:00
Marco Rossignoli 5ca601ebeb Fix File.Delete unix behaviour (dotnet/corefx#32660)
* remove existent test from platform specific

* fix unix

* update tests

* update tests

* remove test duplication

* throw with helper

* address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/25d197892c37067f45cf97619bb0dfb28413a682
2018-10-12 16:44:50 -07:00
Sam Neirinck 68b24b8b69 Cleanup MSDN URL's (dotnet/corefx#32663)
* Fix non-https msdn links

* Additional HTTPS treatment


Commit migrated from https://github.com/dotnet/corefx/commit/0bfc4f3cf62f6fc29162ad5b1b89acc14124a375
2018-10-09 11:59:36 -07:00
Stephen Toub b9556abb0f Add back null checks to File.Encrypt/Decrypt (dotnet/corefx#32580)
* Add back null checks to File.Encrypt/Decrypt

* Re-enable tests


Commit migrated from https://github.com/dotnet/corefx/commit/faaca859c04c4fbe29b9d4f900d0525d7f8385a3
2018-10-02 16:28:22 -04:00
Anirudh Agnihotry 31da7d374d pointer instead of span and name changes in S.IO.FileSystem (dotnet/corefx#32436)
Commit migrated from https://github.com/dotnet/corefx/commit/2d104b4955548f0ebc57a8f4a24417619a7f3b60
2018-09-24 22:49:24 +02:00
Julius Hardt ab07413563 Disable EncryptDecrypt_Read() test on the Home editions of Windows (dotnet/corefx#32342)
* Disable System.IO.Tests.EncryptDecrypt.EncryptDecrypt_Read() on the Home editions of Windows

* Add a comment explaining why we skip the test on home editions


Commit migrated from https://github.com/dotnet/corefx/commit/4f7690ad97ea1772433fcfeafc4b0c26f0fb80a2
2018-09-23 22:32:59 +02:00
Anirudh Agnihotry 8516f17308 DriveFormat returns null on WSL (dotnet/corefx#32372)
* added default value for isHFS

* using and operator


Commit migrated from https://github.com/dotnet/corefx/commit/3a206a056f765b4d0df02e5d0ff6d0f7bdfe23c2
2018-09-20 15:56:01 -07:00
Anirudh Agnihotry ebcb57ce9d Setting the lastWriteTime And LastAccessTime no longer drops any ticks i.e granularity upto nanoseconds (dotnet/corefx#32193)
* nanoseconds granularity

* overflow corrected


Commit migrated from https://github.com/dotnet/corefx/commit/9b2965074a2bd7787e82968bb80398aa4818b30a
2018-09-13 21:43:26 -07:00
Viktor Hofer 5a2a56bb22 Disable failing IO PathFeatures tests on netfx
Commit migrated from https://github.com/dotnet/corefx/commit/99aa6e69c24a39d6b7588bc0ce29207267e92afc
2018-09-07 22:30:34 +02:00
Viktor Hofer 49586efb0d Add uap test leg to CI
Disable/Enable tests for clean uap CI leg


Commit migrated from https://github.com/dotnet/corefx/commit/c54d4a20c315730cd76fb7688c15d0a85837f3ce
2018-08-23 20:16:11 +02:00
Viktor Hofer b998fc821e Xunit 2.4 test changes
Commit migrated from https://github.com/dotnet/corefx/commit/591f0b5ba2c0ddcdad1a326eb327936cb2dd40d8
2018-08-23 19:55:27 +02:00
Viktor Hofer 70bffcd308 Enable netfx perf runs and promote to netstandard
Commit migrated from https://github.com/dotnet/corefx/commit/1b33f6c57bdcb4a2be715a8eaf7ec2483dc5c6c0
2018-08-23 19:55:26 +02:00
Viktor Hofer 8585939ef2 Update xunit to official 2.4.0 runner
Add necessary Test SDK assemblies

Enable test sdk props & targets only for netcoreapp


Commit migrated from https://github.com/dotnet/corefx/commit/f528b668fcd06efbde72a9510feb189e3988d795
2018-08-23 19:53:34 +02:00
Jeremy Kuhne c45d429bd5 Include changes that crossed two checkins. (dotnet/corefx#31861)
Fixes dotnet/corefx#31860

Commit migrated from https://github.com/dotnet/corefx/commit/4a459e6279cc17650b7232defd7465de293d6cd9
2018-08-20 23:34:25 -07:00
Marco Rossignoli e6707cf973 Add Win32 File.Encrypt/Decrypt() implementation (dotnet/corefx#31763)
* Add Win32 File.Encrypt/Decrypt() implementation

* address PR feedback

* address PR feedback

* address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/4451ec9d41916eccbb1dc71beae0d177815096d6
2018-08-20 17:28:41 -07:00
Viktor Hofer 6c5a27d741 Revert "Add Win32 File.Encrypt/Decrypt() implementation (dotnet/corefx#31585)" (dotnet/corefx#31725)
This reverts commit dotnet/corefx@cc9eaa79b5.

Commit migrated from https://github.com/dotnet/corefx/commit/bbda7f35fc46af191978f93434786c218cf5f12c
2018-08-12 13:37:29 -07:00
Jeremy Kuhne b6072abf32 Create Microsoft.IO.Redist (dotnet/corefx#31679)
* Create Microsoft.Internal.IO

Includes all of Path, Directory, *Info, etc. from System.IO with targets of NetFX 4.6.1 and NetCore 2.1.

* Tweaks / minor fixes

* Remove netstandard build.

* Add package

Update to build for 4.7.2 only

* Rename folder to prepare for project rename

* Change the name to Microsoft.IO.Redist

* Namespace tweaks

* Use open key, tweak references

* More tweaks on feedback

Also grab latest build tools for 4.7.x RIDs


Commit migrated from https://github.com/dotnet/corefx/commit/1bff7880bfa949e8c5e46039808ec412640bbb5e
2018-08-10 17:06:39 -07:00
Marco Rossignoli 67d26d46e8 Add Win32 File.Encrypt/Decrypt() implementation (dotnet/corefx#31585)
* Add Win32 File.Encrypt/Decrypt() implementation

* address PR feedback

* address PR feedback

* skipt on Nano Server

* fix WinRT/UWP build


Commit migrated from https://github.com/dotnet/corefx/commit/cc9eaa79b526c2b23ee16f4e453e428e2e84a7df
2018-08-10 10:57:16 -07:00
Anirudh Agnihotry 8e9c9c4a75 Another Case where millisecond Granularity was missed (dotnet/corefx#31593)
* MilliSeconds added

* Test Added for move operation

* LastAccessTimeTest

* avoid overflow and using both seconfs and nanoseconds of the native

* feedback addressed

* Tests fixed for CI

* Feedback addressed

* method signature changed

* removing comments

* named argument added


Commit migrated from https://github.com/dotnet/corefx/commit/510eaf10912ce5790302addb0171916b9a134000
2018-08-08 22:06:57 -07:00
Anirudh Agnihotry 3dcd3db585 Using Utimes instead of utime hence setting millisecond attribute of last access and last modified time to non-zero (dotnet/corefx#31522)
* using utimes instead of utime

* Test for checking millisec attribute is set or not

* Documenting the values in case of the failure

* NanoSecond enabled

* feedback addressed

* int64_t added

* Fixing build on ci Osx(on which utimensat is not available)

* Minor nits done


Commit migrated from https://github.com/dotnet/corefx/commit/cd62bb271e98410319460b4ba48332416bcccf65
2018-08-02 14:10:30 -07:00
Anirudh Agnihotry e527d170fe Maintaining the consistency of tests among master and release branch (dotnet/corefx#31164)
* Feedback Addressed

* Fixing original tests and for appContainers

* comment corrected


Commit migrated from https://github.com/dotnet/corefx/commit/7d916b0fe6c5e723374be7232c79706eedc64466
2018-07-23 13:42:06 -07:00
Anirudh Agnihotry fee351144f MilliSecond Granualrity added to Copy operation on unix (dotnet/corefx#30996)
* test added

* Test Modified

* Adding Implementation

* tabs removed

* modifyingTest

* Fixing build on HFS

* Space around arithemetic operator


Commit migrated from https://github.com/dotnet/corefx/commit/387aa6c624f0cc8b1c0c013dfddeb115f7c16e27
2018-07-12 10:19:39 -07:00
Eric Erhardt cf57323259 Merge master into SdkProj
Commit migrated from https://github.com/dotnet/corefx/commit/e72643b4aab4b33a33baad1fa74b0551cc2cf739
2018-07-05 19:22:10 -05:00
Keerat Singh 7b2d160fd7 GH Issue dotnet/corefx#15652 SqlFileStream Implementation (dotnet/corefx#29879)
* Initial port of SqlFileStream

* Added SqlFileStreamTest

* Cleanup code

* Updated file paths after catchup merge.

* Added newline at the end of Strings.resx

* Fixed cosmetic changes

* Replaced null SafeHandle call

* Added headers to SqlFileStreamTest.cs

* Addressed review feedback by Stephen and Jeremy

* Fixed filename UnSupported.cs to Unsupported.cs to match case in Linux builds.

* Addressed review comments

* Made SqlFileStream netcoreapp and windows specific.

* Update EaName to include Null Terminator

* Fixed cosmetic issues

* Addressed Dan's review feedback.
Removed initially added file Interop.GetFullPathName.cs as is it no longer being used.

* Addressed Jeremy's review comments.

* Addressed Jeremy's review comments about style polish.


Commit migrated from https://github.com/dotnet/corefx/commit/2f7844a8df4fef427df1a2bc77e9f34211a720a1
2018-07-05 16:12:19 -07:00
Eric Erhardt 21b7a52139 Merge master into SdkProj
Commit migrated from https://github.com/dotnet/corefx/commit/0343b37275d50fa44b8db91bd9ed8364f89600fc
2018-07-05 14:06:19 -05:00
Maryam Ariyan 6d9d4c0357 Updating test to assert milisecond granularity for (dotnet/corefx#30763)
- non any linux or
- OSX non-HFS driver formats

Fixes dotnet/corefx#30472

Commit migrated from https://github.com/dotnet/corefx/commit/a399e51941f6435063052df8b47182ddca0b4496
2018-07-03 15:54:48 -07:00
Eric Erhardt 779486884e Merge master into SdkProj
Commit migrated from https://github.com/dotnet/corefx/commit/ec546de620c5248f3662d6aaca989ed382b86b6b
2018-06-28 21:28:41 -05:00
Eric Erhardt 8b6d5baf20 Change .csproj to new Configurations property
Change .sln to use the managed C# project system GUID.


Commit migrated from https://github.com/dotnet/corefx/commit/e05508a62d28f4807f85abe9cb7adf8382f792b4
2018-06-28 17:49:22 -05:00
Stephen Toub 4c9eb2ec25 Simplify built-in types across corefx tests (dotnet/corefx#30660)
Commit migrated from https://github.com/dotnet/corefx/commit/7ae1a252d7e68c5513d2658de7a401c37e9b0504
2018-06-25 22:42:04 -07:00
Eric Erhardt 2053139c9a merge master into SdkProj
Commit migrated from https://github.com/dotnet/corefx/commit/1c91f96ec67a78a33268181d99a73a736b48c13e
2018-06-15 22:24:40 -05:00
Viktor Hofer 23f979bc4c Cleanup BinaryFormatterHelpers usage (dotnet/corefx#30439)
Commit migrated from https://github.com/dotnet/corefx/commit/03d643220955f86ef63c71d3bdd4cae05af1f586
2018-06-15 21:46:15 -04:00
Eric Erhardt 1df03e5bbd Rename dir files to Directory.Build
dir.props => Directory.Build.props
dir.targets => Directory.Build.targets


Commit migrated from https://github.com/dotnet/corefx/commit/204a8dbbc23bfc51d419c93f2f2ddaf50db8020f
2018-06-15 17:07:48 -05:00
Jeremy Kuhne 6c41cc9f88 Fix creating subdirectories under directories with trailing separators (dotnet/corefx#30293)
* Fix creating subdirectories under directories with trailing separators

This broke with dotnet/corefx#27810. Reworked the logic in an attempt to be clearer and added test cases.

This addresses dotnet/corefx#30283.

* Flip the logic to make it a little easier to follow.
(Reduces the number of nots.)

* Skip new test on desktop


Commit migrated from https://github.com/dotnet/corefx/commit/4a6f54e7ab202d8391b050fd9a2cbae8f28374bb
2018-06-12 17:01:11 -07:00
Eric Erhardt 70091b9c8b Merge master into SdkProj
Commit migrated from https://github.com/dotnet/corefx/commit/ad505eb98c6a887db2d2932fec256d9e4e394169
2018-06-11 17:20:10 -05:00
Stephen Toub 2ed60d5cdb Use nameof in more places (dotnet/corefx#30228)
I'd previously scrubbed the repo for places nameof could be used.  A lot more code has come into the repo since then, so I'm rescrubbing.

Commit migrated from https://github.com/dotnet/corefx/commit/54d15abce387fc7ea4cd9546179c4a955ff5ea85
2018-06-11 11:37:10 -04:00
Anirudh Agnihotry 58f1ad6f49 Cut String Allocations for filtered watcher files in Unix Systems (dotnet/corefx#29721)
* Cut Strings from OSX

* unix added

* removed string overload

* Ignore case comparison added

* using equals

* Pinvoke Corrected to remove managed string allocations

* overload for span addded and memory<char>[] to store rented arrays

* Feedback addressed and Filesystem.unix.exists moved to a new file

* Comment added, brackets are removed and using stringcomparison.oridinal


Commit migrated from https://github.com/dotnet/corefx/commit/c55aa6e313e68966f5d974163614181522caed35
2018-06-08 17:55:01 -07:00
Marco Rossignoli e714204d7a Replace files with CoreLib mirror(manual check) (dotnet/corefx#29954)
* remove dups

* Address PR feedback Padding.cs

* address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/8e53c7efea4efd28ba9d111dd4e70e3ca2f987f3
2018-05-30 19:48:51 -04:00
Jeremy Kuhne 7f3e2282ea Make directory enumeration consistent (dotnet/corefx#29908)
* Make directory enumeration consistent

Directories can disappear or be replaced with files after we find them when recursively enumerating. Fix so we don't throw in these cases.

Also make queue handling consistent between Unix/Windows. In error skipping cases we need to be sure that we don't try to process directories we fail to open but don't care about. This simplifies custom error handling.

Fix error mapping in Unix. Add tests

* Fix typo in WinRT

* Address feedback


Commit migrated from https://github.com/dotnet/corefx/commit/d3ed110eff677ceefb9346109dbd1c681e080f34
2018-05-29 12:54:04 -07:00
Dan Moseley a0fb10a2aa Fix uap failures in IO (dotnet/corefx#29816)
* Fix uap failures in IO

* Fix remaining UAP failures

* Fix RuntimeInfo tests

* Var's


Commit migrated from https://github.com/dotnet/corefx/commit/27e718dfc232c8516c69275c0444d4f81d05c3e5
2018-05-25 13:56:24 -07:00
wtgodbe f38ceb30be Convert all .csproj files in src to SDK-style projects
Commit migrated from https://github.com/dotnet/corefx/commit/91d7e62bbf28094a2b419b87847bcd6a7658564d
2018-05-21 11:53:46 -07:00
Jeremy Kuhne 7c4ac470b7 Fix getting attributes for sharing violation files (dotnet/corefx#29790)
* Fix getting attributes for sharing violation files

Some files, such as the pagefile, refuse to allow you to get attributes directly.
You need to enumerate to get the attributes.

Enumerating is expensive, so we had changed from an opt-out to an opt-in. As
it took nearly a year to find this case, switching back to an opt-out with a
larger set of known cases where we get no value from trying again.

Also add an assert to flush out other error codes and scenarios.

* Skip lock test on MacOS (not supported)

* Nano was getting ERROR_NETWORK_UNREACHABLE


Commit migrated from https://github.com/dotnet/corefx/commit/31cdcaa77ab7d03a5430488e180cd1b47d0ee25e
2018-05-18 19:09:15 -07:00
Jeremy Kuhne bd06eacce5 Test enumerating deleted directories. (dotnet/corefx#29750)
Directories can vanish after we first see them when enumerating. This adds a test that specifically does that behavior.

Commit migrated from https://github.com/dotnet/corefx/commit/bc0d84559cfe847a820dac7c1f21442385aa9b09
2018-05-17 11:02:08 -07:00
Stephen Toub b90fae078b Add more missing overrides to refs (dotnet/corefx#29738)
Ran /t:GenerateReferenceSource and undid irrelevant changes, though I kept a few files where the changes were trivial (e.g. whitespace) and it seemed better to just accept the change to stay in sync with GenerateReferenceSource.

In general I only added missing overrides on non-sealed classes, but when there were already overrides included on sealed classes, I added them back for consistency.

Commit migrated from https://github.com/dotnet/corefx/commit/10aa8277de2521fb1e6a5b42d053ad8cc947be81
2018-05-16 22:11:33 -04:00
Stephen Toub 4dafdf5211 Replace shared Interop.FormatMessage.cs with non-shared one
Commit migrated from https://github.com/dotnet/corefx/commit/f3414d6cc3463b9e243e5d732d7e401c2d037d05
2018-05-10 16:03:31 -04:00
Jeremy Kuhne e4a420fab9 Remove LStat call in enumeration (dotnet/corefx#29515)
It shouldn't be necessary. We included it for 2.1 as we made the same call
in 2.0 while enumerating and didn't have time to let removing the call bake.

Commit migrated from https://github.com/dotnet/corefx/commit/db62f1d4cd961f74b249932b5f9bcc083e5bfa91
2018-05-04 15:58:43 -04:00
Jeremy Kuhne 595d528c57 Fix handling of Unix directories (dotnet/corefx#29502)
Some file systems return DT_UNKNOWN for directories. Additionally we need
to handle if Stat fails and fall back to LStat.

This showed up on RHEL 7.2 with xfs.

Commit migrated from https://github.com/dotnet/corefx/commit/da81e551027e41beb287a1fef90c5a2d8a6b6f3a
2018-05-03 21:34:15 -07:00