Age | Commit message (Collapse) | Author |
|
* Enable TimesIncludeMillisecondPart on selected filesystems only
Use filesystem name to suppress the test failure
* Make the test fail
* Break out tests
|
|
* Use FileSystemName in FileSystemWatcher
- Uses newer spanified version in FileSystemName
- Doesn't allow extended match chars `<`, `>`, `"` as these are legal in Unix
* Plumb through the case sensitivity
* Update tests
* Tweak test for netfx
* Tweak the comment to be a bit more readable
|
|
|
|
* Use Win32Marshal from CoreLib shared code
Fix hr issue caught by Common.Tests.
* Move string condition inside exception arguments
|
|
Name surrogates are the only type of reparse points that we should be simply detaching.
All other reparse points we should be drilling into- this was causing issues for OneDrive
cloud files.
|
|
|
|
|
|
Enable reverse APICompat for 1:1 libraries
|
|
- Fix #27244 validation
- Add more enumerable tests
Fixes #27244
|
|
|
|
* Start adding alternate data stream tests
Also fill out ExampleTests.
* Skip on NetFX
|
|
* Test changes
- Add new tests for more coverage on enumeration
- Re-enable tests
* Add missing assert
|
|
This change collapses some baseline files as well as fixes
some of the reference mis-matches
|
|
|
|
|
|
|
|
Only premptively adding for FileSystemInfo if we end in period or space.
Long path is taken care of later.
Clean up code a little and add test for DirectoryInfo.Move.
|
|
* Support trimmed paths in FileInfo
Some paths are not creatable in Windows without special syntax. Notably paths with trailing spaces and periods. As GetFullPath() (and GetFullPathName()) trim these we would lose the correct file name as we passed the path around. With the enumeration changes we now populate FileInfo correctly- this change allows the other methods to work when wrapped around such a path.
* Tweak comments.
Remove NotSupported and SecurityException from Exists as these are no longer thrown.
Add a test fix I hadn't staged correctly.
|
|
|
|
ReadAllTextAsync is convenience method that allocates a lot anyway, so the saving from StringBuilderCache is unlikely to show up. And this method is unlikely to be used for small strings where StringBuilderCache helps anyway.
|
|
This commit does several things:
- Exposes the new `ValueTask` extensibility model being added in coreclr. The ValueTask-related files will separately be mirrored over to corefx to enable the netstandard build of System.Threading.Tasks.Extensions.
- Adapts all `Stream`-derived types to return `ValueTask` instead of `Task` from `WriteAsync`.
- Changes the new `WebSocket` `SendAsync` method to return `ValueTask` instead of `Task`, and updates the `ManagedWebSocket` implementation accordingly. Most `SendAsync`s on `ManagedWebSocket` should now return a `ValueTask` that's either completed synchronously (no allocation) or using a pooled object. It now uses the underlying transport's new `WriteAsync` overload that returns `ValueTask`.
- Switches more uses of `ReadAsync` and `WriteAsync` over to the new overloads, including in Process, DeflateStream, BrotliStream, File, HttpClient, SslStream, WebClient, BufferedStream, CryptoStream,
- Removed some unnecessary array clearing from various routines using ArrayPool (after the clearing was added we changed our minds and decided clearing was only necessary in very specific circumstances)
- Implements a custom `IValueTaskSource` in Socket, such that async receives and sends become allocation-free (ammortized). `NetworkStream` then inherits this functionality, such that its new `ReadAsync` and `WriteAsync` are also allocation-free (in the unbounded channel implementations; we can subsequently add it in for bounded).
- Implements a custom `IValueTaskSource` in System.Threading.Channels, such that reading and writing are ammortized allocation-free up to one concurrent reader and writer.
- A few random things I noticed as I was going through, e.g. missing ConfigureAwait, some incorrect synchronization in tests, etc.
- Adds a ton of new tests, mainly in System.Threading.Tasks.Extensions, System.Threading.Channels, and System.Net.Sockets.
|
|
* Remove span helpers, use mirrored PathInternal helper
Remove other unnecessary helpers (notably with Path.Join available)
* Fix Unix
|
|
* Stop FileSystem WriteAsync test from writing too much data to disk
* Fix TotalBytesWritten
* Move bytes written cap to inner loop
* Fix do/while syntax, add cancellation token back
* Remove token
|
|
* Logging for TimesIncludeMillisecondPart test
* Enable test for Linux
* Formatting
|
|
Add test coverage.
|
|
|
|
|
|
* Update tests for Path changes
Updates for https://github.com/dotnet/coreclr/pull/16478
* Add back Unix active issue (wishful thinking that this would get the same error on Unix)
* Address feedback
|
|
* Make final API review changes to file enumeration
Tweak stack array initialization to just zero the first element in matcher algorithm.
cc: @danmosemsft @terrajobst
* Don't null out the native name to track conversion
|
|
* Rename string-slicing extension methods
As part of
https://github.com/dotnet/corefx/issues/26894
the api folks have approved renaming AsROSpan and AsROMemory
on string instances to AsSpan and AsMemory (as the "readonly"
is obvious given the read-only nature of the input.)
This puts the renaming in effect. Basically a big search-replace
commit.
* Fix OpenSSL build break
* I see this is going to be a treadmill
|
|
Indexer that let's you see and edit the content of the pending string is more efficient and flexible.
Fixes #26643
|
|
|
|
* Handle errors getting state in Unix
Throwing errors while examining extended state while enumerating isn't consistent with Windows behavior. Windows never throws past getting directory entry data as all state is already available.
Ensure entry attribute state is consistent with initial construction.
* Win 7 CI machines are also setting NotContentIndexed.
|
|
Update assert for better logging. Skip directory entries.
fixes #27244
|
|
|
|
* Fix enumerating the root directory.
Shouldn't trim the trailing separator when at the root. On Windows that makes
the path drive relative- which breaks most of the logic.
Add a test to catch this case.
* Add the Unix part of the fix.
|
|
NtCreateFile allows passing in a base handle which makes opening child directories much faster. This cuts anywhere from 3-10% of the time off of a GetFiles() call.
It is significantly faster as it avoids normalization and path parsing overhead.
|
|
Also update .sln using UpdateVSConfigurations
|
|
Exposing string restricts the ability to change internals without introducing unnecessary allocations.
|
|
Just call Environment.CurrentDirectory. Remove a number of P/Invokes
that are no longer in use.
|
|
Also refactor Unix attribute handling a bit to be more consistent and
ensure that we don't make unnecessary addtional filesystem calls.
|
|
finalizer (#26921)
* Adding test to verify FileStream.Dispose() skips IO Related Exception only on finalization
* Skipping test on netfx because the behavior in netfx is different
|
|
|
|
* API tweaks to match latest updates to spec
Add a few new tests
See #25873
* Properly clear state when enumerating on Unix.
Make sure we don't include special directories in subdir processing. Add test.
Collapse helper that was only called in one place, and remove dead one.
|
|
* Clear initlocals in a bunch of assemblies
Sets
```XML
<ILLinkClearInitLocals>true</ILLinkClearInitLocals>
```
for the assemblies:
- System.IO.FileSystem
- System.IO.Pipes
- System.Memory
- System.Net.Http
- System.Net.Http.WinHttpHandler
- System.Net.NameResolution
- System.Net.NetworkInformation
- System.Net.Primitives
- System.Net.Requests
- System.Net.Security
- System.Net.Sockets
- System.Net.WebSockets
- System.Net.WebSockets.Client
- System.Net.WebSockets.WebSocketsProtocol
- System.Private.Uri
- System.Runtime
- System.Runtime.Extensions
Eventually we'd ideally set the flag for the whole repo; these are just the ones I audited thus far. In a few cases I had to make code changes to adapt, where the code was expecting stackallocs to be cleared. I also looked at a few other projects (System.Collections, System.Runtime.Numerics) where there were more significant dependencies on clearing and I decided to leave those for later.
* Disable ILLinkClearInitLocals running on Unix until it works there
|
|
* Switch from using SafeHandle for Unix enumeration
* Address feedback
* Fix faceplant, dispose in test.
|
|
|
|
|
|
For non-trivial recursive enumerations we were running out of file descriptors. Stop creating them when we queue pending subdirectories and only create when we dequeue.
|
|
* Make Unix filename conversion lazy
Also hook error handling.
* Address feedback
|