You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there weren't an implicit conversion, I probably would have guessed that. Overall, it seems like keeping UPaths and strings a bit separate is a good idea. Especially when working with subpaths like this, the chances that you'll confuse one for the other is pretty high.
The text was updated successfully, but these errors were encountered:
Agreed, that's one of the gray area of the API. Not allowing implicit conversion from string to UPath would have lead to annoying explicit cast in many places (more than the creation of filesystems but all methods provided by IFileSystem) so made this choice of simplicity vs correctness, but the downside is that there are a few cases like the one you point out that are not protected against a misusages (and the XML doc is not saying anything about this). Not sure I would want to change this after all these years this API has been released though...
Just hit this:
I assume the proper way to do this is:
If there weren't an implicit conversion, I probably would have guessed that. Overall, it seems like keeping
UPath
s and strings a bit separate is a good idea. Especially when working with subpaths like this, the chances that you'll confuse one for the other is pretty high.The text was updated successfully, but these errors were encountered: