-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Use FileExtensionHelpers more widely #10831
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Such helper actually exists : |
Pretty sure @gave92 took care of the shortcuts. |
#10772 took care of ".url" and ".lnk" shortcuts checks. |
2 tasks
2 tasks
1 task
Repository owner
moved this from 🆕 New
to ✅ Done
in Files task board
Dec 26, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
We are often in need of identifying an item's type, whether it be folder, file, images or anything really.
Currently, we have rogue tests to do this work for us repeated separately in the code. For example when it comes to identify shortcuts :
OpenPath(...) in NavigationHelpers:
path.EndsWith(".lnk", StringComparison.Ordinal) || path.EndsWith(".url", StringComparison.Ordinal);
ToStorageItem(...) in StorageHelpers
if (path.EndsWith(".lnk", StringComparison.OrdinalIgnoreCase) || path.EndsWith(".url", StringComparison.OrdinalIgnoreCase))
FileExtensionHelpers.cs
defines a bunch of methods that are cattled to such ends. We should enrich it and make its use wider.Concerned code
All the codebase.
Gains
Requirements
FileExtensionHelpers.cs
used more when identifying item's type.Comments
No response
The text was updated successfully, but these errors were encountered: