* 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
* 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
* 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
Some file systems, like procfs, can return 0 for a file's length, even though it actually contains on-demand computed contents. This breaks File.ReadAllBytes{Async}, which currently assumes that a length of 0 means the file is empty. This commit fixes it by changing the assumption to mean that a length of 0 means we can't depend on the Length and instead need to read until EOF.
Commit migrated from https://github.com/dotnet/corefx/commit/77bf4078608a5229afd3132115638b59215f478b
* 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