* 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
* Use FromApp APIs to allow brokered file access
This changes our P/Invokes to use the FromApp variants, which
allow for brokered file access on UAP. These are only included
in the UAP build.
Adds tests for the brokered IO WinRT functions and removes a
dead option from movefile. This option was removed in Windows 8
and did not work correctly in prior OSes. (This was needed
for this change.)
This change depends on the referenced dll being packaged and
added to our dependencies. There is a related change for CoreCLR
that supports FileStream.
* Address feedback.
* Remove unused define.
* Test tweaks
* Add ActiveIssue to known test failure
Unsetting attribute after setting isn't working (only in brokered
locations). A fix to FileApiInterop.dll is in the works.
* Disable other attributes test.
Commit migrated from https://github.com/dotnet/corefx/commit/5e16d10c41536446f7be2299c61cdc85992966c0
* Nested directories were too deep
Nesting directories with Windows paths were over 800
levels deep, causing intermittent issues with stack overflows.
Making directory segments longer to mitigate.
* Use "N" format for guids per feedback
Commit migrated from https://github.com/dotnet/corefx/commit/27886bcb3d016a744e7461b3e378e7261230960f
* Fill out FileSystemInfo state when enumerating
On Windows FileSystemInfos are filled in with state as we have
all of the state from FindFirstFileEx.
* Add more tests
Refactor Time tests and add cases for refresh state.
Fix positive attribute assertion.
* Missed one of the cases
* Tweaking the time tolerance didn't succeed.
Putting it back to -3 seconds.
* Refactor tests
Gets coverage consistent
Fixes test bug in DirectoryInfo where it was creating files for invalid attributes
* Address feedback
Commit migrated from https://github.com/dotnet/corefx/commit/9468aedba81b7d0b43f5545fc840a53544164694
* Fix Unix missing file state
In the original .NET implementation a missing file never
throws directly with FileInfo. Attributes get the error result
from Windows (-1) and times aren't initialized.
* Feedback
* Change FileSystemTest derivation
FileSystemTest should derive from RemoteFileSystemTest so
we can have one base class.
* Add RemoteExecutorBase to performance test project
* Address test feedback
* Fix File.GetAttributes on Unix
NetFX doesn't rely on FileInfo and throws when getting attributes
on missing files through File.
Commit migrated from https://github.com/dotnet/corefx/commit/801dde95a5eac06140d0ac633ac3f9bfdd25aca5
* Fix using Directory to move files
See dotnet/corefx#19710. NetFX behavior is that you can use Directory
to move files. This was broken trying to match other legacy
behavior in dotnet/corefx#17913. Tested on NetFX and CoreFX.
* Fix check for Unix
Unix impl doesn't tolerate a trailing separator. Public api
explicitly checks for this.
* More fixes and tests
Unix won't move the file with a trailing slash. Add more tests
for different combinations of trailing slashes. Validated against
NetFX.
* Attempt to get MoveDirectory further aligned
Trying to handle trailing separator on a source file cases
in the same way as Windows.
* Extend tests, move Unix condition
* Another tweak and more tests
* Fix comment
Commit migrated from https://github.com/dotnet/corefx/commit/ea514e2f4e61bd3128ea3753071af2681f17f063
The FileShareOpen test has been failing sporadically with sharing violations. It turns out the problem has to do with FileShare.Inheritable being included in the list of FileShare values to test. If another test in the same process concurrently spawns a process while a FileShare.Inheritable file is open, that file's handle will be inherited into the child process, which will in turn keep the file in use for longer than the test expects. When it then tries to re-open the file, it may encounter a sharing violation if the subsequent open is incompatible with the previous one's FileShare.
Commit migrated from https://github.com/dotnet/corefx/commit/041672ff3642753807a4502a4c407cb82bfa1009
* Uri: detect Unix path on Unix, detect Dos&Unc path on Windows
* Update System.IO.Packaging/tests
* Update System.Xml.XmlSchema.XmlSchemaValidatorApi.Tests
* Update Common.Tests
* Update System.Private.Uri.Functional.Tests
* Update System.Private.Uri.ExtendedFunctional.Tests
* Update System.Runtime/tests
* Uri.MethodsTests.cs: comment out failing inputs
* Restore uri minimal length of 3
* Require unix paths to start with a /
* Allow Unix path file uri to start with '\'
* FileWebRequestTest: revert extra slashes added (file:/// back to file://)
* Uri: fix empty newHost bug and revert workaround in IriTest
* Annotate PlatformSpecific tests
* IdentityHelperTests: use file path that works on Windows and Linux
* System.IO.Packaging/tests: rename s_LocalFile to s_fullPathToLocalFile
* Uri: update comments on minimal Uri length check, don't check length twice on Windows
* Use PlatformDetection.IsWindows
* Ensure Roslyn gets rid of UnixPath checks on Windows by adding IsWindowsSystem (const bool) checks
* Uri: Fix uapaot build by including Uri.Windows.cs
* IdentityHelperTests: rename GetNormalizedUrlHash_Unix -> GetNormalizedUrlHash
* Uri.MethodsTests: don't require GetHashCode to return different values when Uris only differ in case
* s_IsWindowsSystem -> s_isWindowsSystem
* Detect Dos and Unc paths on Unix
* Update tests
* Clean-up
* Clean-up II
* Clean-up III
* Clean-up IV
* Clean-up V
* Move Flags.UnixPath to the end of the Flags enum
Commit migrated from https://github.com/dotnet/corefx/commit/7df6b74cc4aeebc86e76b5c7901a59fa7fa793f6
* Fix tests run on desktop
Conditionalize tests appropriately so long path and new syntax
support are taken into account.
Move some test data into Theories for easier debugging.
Fix and add issue to colon check tests until we fix CoreCLR.
* Address feedback
Commit migrated from https://github.com/dotnet/corefx/commit/551fe49174378adcbf785c0ab12fc69355cef6e8
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
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